Skip to content

Commit

Permalink
fix(validators): improves the minLength and maxValue validator messag…
Browse files Browse the repository at this point in the history
…es, closes vuelidate#1040
  • Loading branch information
dobromir-hristov committed May 1, 2022
1 parent 659cda5 commit 4c8c218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/validators/src/withMessages/maxValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import maxValue from '../raw/maxValue'
*/
export default max => ({
$validator: maxValue(max),
$message: ({ $params }) => `The maximum value is ${$params.max}`,
$message: ({ $params }) => `The maximum value allowed is ${$params.max}`,
$params: { max, type: 'maxValue' }
})
2 changes: 1 addition & 1 deletion packages/validators/src/withMessages/minLength.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import minLength from '../raw/minLength'
export default function (min) {
return {
$validator: minLength(min),
$message: ({ $params }) => `This field should be at least ${$params.min} long`,
$message: ({ $params }) => `This field should be at least ${$params.min} characters long`,
$params: { min, type: 'minLength' }
}
}

0 comments on commit 4c8c218

Please sign in to comment.