@modular-forms/react
Version:
The modular and type-safe form library for React
12 lines (11 loc) • 313 B
JavaScript
import { setError } from './setError';
/**
* Clears the error of the specified field or field array.
*
* @param form The form of the field.
* @param name The name of the field.
* @param options The error options.
*/
export function clearError(form, name, options) {
setError(form, name, '', options);
}