Skip to content

Instantly share code, notes, and snippets.

View jhons1206's full-sized avatar
🏠
Working from home

Jhon Sandoval jhons1206

🏠
Working from home
View GitHub Profile
@2014maximo
2014maximo / Expresiones regulares con Validators
Last active May 27, 2024 18:01
Expresiones regulares para formularios reactivos
//VALIDAR CAMPO IP 255.255.255.255
Validators.pattern(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/)
//VALIDAD SOLO NÚMEROS
Validators.pattern(/^([0-9])*$/),//solo numeros
//VALIDAD CAMPO REQUERIDO
Validators.required,
//VALIDA TELEFONO