Skip to content

Conversation

@masaditya
Copy link
Collaborator

@masaditya masaditya commented Aug 18, 2020

@masaditya masaditya requested a review from mnindrazaka August 18, 2020 13:09
return yup.object({
email: yup.string().required(),
password: yup.string().required(),
password_confirmation: yup.string().required(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validation buat password_confirmation ini bisa diimprove dengan membuatnya harus sama seperti password. Coba kamu lihat referensi ini https://til.hashrocket.com/posts/vahuw4phan-check-the-password-confirmation-with-yup

Suggested change
password_confirmation: yup.string().required(),
password_confirmation: yup.string()
.oneOf([yup.ref('password'), null], 'Passwords must match'),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants