Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 23, 2020 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/e4dfe5011a21e7bd103de917a25d480d to your computer and use it in GitHub Desktop.
Save parzibyte/e4dfe5011a21e7bd103de917a25d480d to your computer and use it in GitHub Desktop.
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