Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

Commit

Permalink
Modify README customLocale wrong demo
Browse files Browse the repository at this point in the history
  • Loading branch information
haydnhkim authored and ctavan committed Sep 26, 2017
1 parent 8cf5a27 commit 24266b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ setLocale({
default: 'Não é válido',
},
number: {
max: 'Deve ser maior que ${min}',
min: 'Deve ser maior que ${min}',
},
})

Expand All @@ -169,7 +169,7 @@ const schema = yup.object().shape({
name: yup.string(),
age: yup.number().min(18),
})
schema.validate({ name: 'jimmy', age: 'hi' })
schema.validate({ name: 'jimmy', age: 11 })
.catch(function(err){
err.name // 'ValidationError'
err.errors // => ['Deve ser maior que 18']
Expand Down

0 comments on commit 24266b1

Please sign in to comment.