Created
August 4, 2020 13:32
-
-
Save diegorodriguesvieira/8719649841ab40169ab5c5a0c879d690 to your computer and use it in GitHub Desktop.
date.js
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
birth_date: Yup.string() | |
.required('Campo obrigatório') | |
.test('valid-date', 'Data inválida', (value) => { | |
return moment(value, 'DD/MM/YYYY', true).isValid(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment