Async Validation Guide
This page is coming soon as part of the documentation restructure.
Learn how to implement debounced server-side validation with El Form.
Basic Async Validation
const form = useForm({
fieldValidators: {
email: {
onChangeAsync: async (value) => {
if (!value) return { isValid: true };
const response = await fetch(`/api/check-email?email=${value}`);
const data = await response.json();
return {
isValid: !data.exists,
errors: data.exists ? { email: "Email already taken" } : undefined,
};
},
},
},
});
Full async validation guide with debouncing and error handling is coming soon.