-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://edu.duthanhduoc.com/learn/ReactJs-Super?lessonId=139 #92
Comments
confirm_password: {
required: {
value: true,
message: 'Vui lòng điền vào mục này'
},
validate: val ? (value: string) => (value === val ? true : 'Mật khẩu không khớp') : undefined,
minLength: {
value: 6,
message: 'Mật khẩu phải từ 6 đến 160 ký tự'
},
maxLength: {
value: 160,
message: 'Mật khẩu phải từ 6 đến 160 ký tự'
}
}```
ở phần confirm này em có cần check lại lenghth ko anh,vì dù sao nó cũng phải giống password (mà mình đã check ở password rồi) . Nếu giữ phần checkLength lại thì nó bị ưu tiên cái lỗi của checkLength trước ấy. Ví dụ mình nhập confirm pass mà nó vừa khác với password,mà vừa có số kí tự nhỏ hơn 6 thì nó hiện lỗi của nhỏ hơn 6,khi nào đúng số kí tự thì nó mới hiện lỗi khác password. Để khắc phục thì mình dùng điều kiện để check cũng đc,nhưng mà nếu bỏ đi 2 cái checkLength kia thì có ổn hơn ko anh? |
em có thể xóa checklenght luôn cũng đc. cái này cũng k quan trọng lắm |
Khu vực học tập | Được Edu
Được chỉ cung cấp các khóa học lập trình online chất lượng, nói không với khóa lởm!
https://edu.duthanhduoc.com/learn/ReactJs-Super?lessonId=139
The text was updated successfully, but these errors were encountered: