November 2018
Beginner
502 pages
10h 22m
English
When the user fills in the form, we want the validation rules to trigger when a field loses focus. We'll implement this in this section:
const handleChange = ( ...};const handleBlur = ( e: | React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement> | React.FocusEvent<HTMLSelectElement>, context: IFormContext) => { if (context.validate) { context.validate(props.name, e.currentTarget.value); }};return ( ... )
Read now
Unlock full access