fix form validation mode

This commit is contained in:
Ildar Kamalov
2025-01-24 14:49:12 +03:00
parent 254b25a026
commit 681cdb023e
27 changed files with 178 additions and 83 deletions

View File

@@ -63,7 +63,7 @@ const Form = ({ initialValues, onSubmit }: FormProps) => {
watch,
formState: { isSubmitting, isDirty },
} = useForm<FormData>({
mode: 'onChange',
mode: 'onBlur',
defaultValues: {
upstream_dns: initialValues?.upstream_dns || '',
upstream_mode: initialValues?.upstream_mode || DNS_REQUEST_OPTIONS.LOAD_BALANCING,