-
Notifications
You must be signed in to change notification settings - Fork 4
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
Sign Up Validate #38
base: master
Are you sure you want to change the base?
Sign Up Validate #38
Conversation
ready |
@@ -0,0 +1,51 @@ | |||
const { body, validationResult } = require('express-validator'); | |||
exports.registerValidation = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ủa htrc c suggest là dùng class-validator
mà ta ơi
if errors && errors.length > 0 | ||
.col-12 | ||
.alert.alert-danger | ||
p Vui lòng sửa lỗi: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I18n text
const { body, validationResult } = require('express-validator'); | ||
exports.registerValidation = [ | ||
body('name') | ||
.notEmpty().withMessage('Tên người dùng là bắt buộc.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I18n message
3, 50, ...
-> các giá trị hằng số khai báo trong file constant nhé
Checklist tự review pull trước khi ready để trainer review
Related Tickets
WHAT (optional)
completed/total
in admin page.HOW
WHY (optional)
normal
items. But in new version, we havestate
andconfirm_state
depends on bothnormal
+not_normal
items.Evidence (Screenshot or Video)
Notes (Kiến thức tìm hiểu thêm)