📖 docs (readme): add validation documentation

This commit is contained in:
Abizrh
2025-08-31 17:28:11 +07:00
parent f5209154ee
commit 8f2623b15e
+10
View File
@@ -62,6 +62,16 @@ The basic development workflow follows these steps:
- Pages load the appropriate flow from `components/flow/`.
- They do not contain UI or logic directly, just route level layout or guards.
### Validation
- UI level validation in `components/app`. help users avoid mistakes before submitting.
- Lightweight/instant validation related to UX.
- Basic formatting (email regex, numeric-only, password length).
- Showing error messages directly under the field.
- Business level validation in `components/flow`. cannot rely only on the UI, since it often requires server-side checks or rules that may change.
- More complex validation rules tied to business logic.
## Code Conventions
- Under the script setup block, putting things in group with the following order: