Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function validar() {
- usuario = document.getElementById('usuario').value;
- patron = /d{3}/;
- if(patron.test(usuario)){
- alert("correcto")
- }else{
- alert("ERROR")
- }
- if (usuario > 99 && usuario < 1000) {
- //válido
- }
- textoterminadoen1234
- // ^^^
- // coincide con estos 3
- /^D*d{3}$/
- /^(?:D*d){3}D*$/
Add Comment
Please, Sign In to add comment