Skip to content

Instantly share code, notes, and snippets.

@fmagrosoto
Created September 27, 2025 17:25
Show Gist options
  • Save fmagrosoto/bf6e2086ea36bc156c7289cd71bc6ca6 to your computer and use it in GitHub Desktop.
Save fmagrosoto/bf6e2086ea36bc156c7289cd71bc6ca6 to your computer and use it in GitHub Desktop.
Valida que sea un password seguro a través de un pattern
<input type="password"
name="seguridad"
id="seguridad"
autocomplete="new-password"
minlength="10"
maxlength="14"
pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{10,14}$"
title="Debe tener entre 10 y 14 caracteres, incluyendo al menos una mayúscula, una minúscula, un número y un símbolo especial."
required>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment