소스 정보
- 저장소
- Dev-Toolbelt/dev-team-agents
- 최근 소스 활동
- 2026년 5월 11일 16:18
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill form-handling명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | form-handling |
| description | Form design — state, validation, error feedback. Framework-agnostic. |
Before writing any form code, check for an existing library:
| Signal | Library |
|---|---|
react-hook-form, useForm, register, Controller | React Hook Form |
formik, useFormik, <Formik> | Formik |
vee-validate, useField, useForm (Vue) | VeeValidate |
@angular/forms, FormBuilder, FormGroup, ReactiveFormsModule | Angular Reactive Forms |
zod, yup, valibot imports alongside form code | Schema validation library |
If no library is detected: useState per field is acceptable for forms with 1–3 fields. For anything larger, recommend adopting the project's preferred library before building.
Always bind input value to state and update state on change. Uncontrolled inputs (ref-only) are acceptable only for file inputs or third-party widgets that require direct DOM access.
| Trigger | When to use |
|---|---|
onBlur | Default for most fields — validates after the user leaves the field |
onChange | Use only after the first submission attempt, or for fields with instant feedback (password strength) |
onSubmit | Always run a full validation pass on submit, regardless of field-level validation |
Never validate onChange from the first keystroke on empty fields — it creates errors before the user has had a chance to type.
Define validation rules in a single schema (Zod, Yup, Valibot, or equivalent) rather than scattered if statements in handlers. The schema is the single source of truth for what constitutes valid data.
// good — rules live in one place, reusable on the server too
const orderSchema = z.object({
quantity: z.number().min(1).max(999),
email: z.string().email(),
})
aria-describedby (the field's id matches the error element's id)double-submission prevention in the agent)reset() must restore every field to its initial value, not just clear them to emptyregister over Controller for native inputs — less overheadController for third-party components (date pickers, select libraries)mode: 'onBlur' as the default validation triggerresolver (zod, yup) to keep validation out of the componentvalidationSchema with Yup rather than the validate function for complex formssetFieldValue inside onChange handlers — use Formik's handleChange to avoid double rendersenableReinitialize should be false by default; set to true only when the form must reflect external data changesdefineRule + configure globally for shared rules; use inline rules only for one-off caseszod via @vee-validate/zod for schema-first validationuseForm + useField (Composition API) is preferred over the Options API component approachFormBuilder — never instantiate FormGroup / FormControl manuallyFormControl definition, not in the templateupdateOn: 'blur' on controls that should validate after focus lossAbstractControl.statusChanges is the right hook for cross-field dependent validation — avoid manual valueChanges hacks| Anti-Pattern | Problem |
|---|---|
| Validation logic duplicated in component and service | Single source of truth broken; rules drift apart |
| Showing all errors before the user interacts | Hostile UX — validate progressively |
| Resetting only visible fields on submit | Hidden state leaks into the next submission |
Calling event.preventDefault() manually and then forgetting to handle errors | Leaves the form in a broken state on failure |
| Storing form state in a global store | Forms are transient UI state — keep them local |
any type for form values | Defeats the purpose of schema validation |