Closed ARKKYN closed 5 years ago
For my opinion it's you app logic to check if input is touched or disable submit button on some conditions. This library is only validates value, prevent form submitting if validation fails and give you validation result
class MyForm extends React.Component {
state = {
touched: false,
}
handleTouch = () => {
this.setState({ touched: true });
}
render() {
return (
<TextValidator
onBlur={this.handleTouch} // or onChange, whatever you need
/>
);
}
}
@NewOldMax It is not able to detect if form is dirty or touched and feature to make it dirty by function