diff options
| author | Nikhil M Warrier <nikhilmw.dev@gmail.com> | 2026-03-17 21:37:59 +0530 |
|---|---|---|
| committer | Nikhil M Warrier <nikhilmw.dev@gmail.com> | 2026-03-17 21:37:59 +0530 |
| commit | 5a290ef455f2c964cb940ef71c6180125cf39959 (patch) | |
| tree | 5756006592fb157030dc51e285a615cb7570bb6e | |
| parent | 5c77301da822b57cd14e8ea6dd40477f4179a8a8 (diff) | |
Fix: Checkboxes cannot have 'required' attribute
| -rw-r--r-- | src/components/FormField.astro | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/FormField.astro b/src/components/FormField.astro index 64b4d7d..9b9d95c 100644 --- a/src/components/FormField.astro +++ b/src/components/FormField.astro @@ -60,7 +60,7 @@ const fieldType = field.type as astroHTML.JSX.HTMLInputTypeAttribute type={fieldType} name={field.id} value={opt} - required={field.required && index === 0} + required={field.type === 'radio' && field.required} class="mr-2" /> {opt} |
