Created
March 23, 2020 22:42
-
-
Save parzibyte/e4dfe5011a21e7bd103de917a25d480d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validator: (value) { | |
if (value != 'Luis') { | |
return 'El nombre debe ser Luis o Pedro'; | |
} | |
if (value != 'Pedro') { | |
return 'El nombre debe ser Luis o Pedro'; | |
} | |
// Aquí más validaciones... | |
//.. | |
// Si no se invoca a return antes y llegamos hasta acá, entonces la validación es correcta | |
return null; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment