commit
This commit is contained in:
52
plans/training-type-review.md
Normal file
52
plans/training-type-review.md
Normal file
@@ -0,0 +1,52 @@
|
||||
Investigate the "ประเภทการอบรม" dropdown validation.
|
||||
|
||||
Current issue:
|
||||
The form displays:
|
||||
|
||||
"Invalid input: expected string, received undefined"
|
||||
|
||||
instead of a friendly Thai validation message.
|
||||
|
||||
Tasks:
|
||||
|
||||
1. Review the React Hook Form configuration.
|
||||
2. Review the Zod schema.
|
||||
3. Review the Select component.
|
||||
4. Ensure the field is correctly registered.
|
||||
5. Ensure the Select binds:
|
||||
- value
|
||||
- onValueChange
|
||||
6. Ensure defaultValues contains a valid default or empty string.
|
||||
7. Replace raw Zod error messages with Thai validation messages.
|
||||
|
||||
Training Type options should be:
|
||||
|
||||
- INTERNAL
|
||||
Label: อบรมภายใน (Internal Training)
|
||||
|
||||
- EXTERNAL
|
||||
Label: อบรมภายนอก (Public Training)
|
||||
|
||||
- ONLINE
|
||||
Label: e-Learning / Online Course
|
||||
|
||||
- OJT
|
||||
Label: On the Job Training (OJT)
|
||||
|
||||
Validation message:
|
||||
|
||||
กรุณาเลือกประเภทการอบรม
|
||||
|
||||
Verify:
|
||||
|
||||
- Create mode
|
||||
- Edit mode
|
||||
- Reset form
|
||||
- Validation after submit
|
||||
|
||||
Return:
|
||||
|
||||
- Root cause
|
||||
- Files changed
|
||||
- Fixed code
|
||||
- Regression checklist
|
||||
Reference in New Issue
Block a user