Closed filipesantoss closed 4 years ago
Whenever a variable name consists of more than two words, underscores are inserted between every word starting at the second one - instead of spaces - in the error messages.
The following code
const Validator = require('Validator'); const data = { theeWordName: '' }; const rules = { theeWordName: 'required|min:1' }; const validator = Validator.make(data, rules); if (validator.fails()) { console.log(validator.getErrors()); }
Produces the following output
{ theeWordName: [ 'The thee word_name field is required.', 'The thee word_name must be at least 1 characters.' ] }
I'll take a look at this this weekend.
Whenever a variable name consists of more than two words, underscores are inserted between every word starting at the second one - instead of spaces - in the error messages.
The following code
Produces the following output