-
-
Save parzibyte/7ccfa9ca40048d1fe7aa0ff3ad82cda7 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
VeeValidate.Validator.extend('prohibirPalabras', { | |
getMessage: (campo, argumentos) => { | |
// argumentos es un arreglo | |
return "El campo " + campo + " no puede contener las siguientes palabras: " + argumentos.join(" "); | |
}, | |
validate: (valor, argumentos) => { | |
return argumentos.every(argumento => !valor.includes(argumento)) | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment