Open BondarenkoAlex opened 7 years ago
You can do it like this (see third parameter):
this.validatorTypes = strategy.createSchema(
// First parameter is a list of rules for each element name
{
name: 'required',
email: 'required|email',
age: 'min:18'
},
// Second parameter is optional and is a list of custom error messages for elements
{
"required.email": "Without an :attribute we can't reach you!"
}
// Third parameter is also optional; a callback that takes the validator instance created
// and can be used to call methods on it. This is run at the point of validation.
function (validator) {
validator.lang = 'ru';
}
);
Hello. How can I set the language 'ru' ?