I'm using input from formsy-semantic-ui-react for form validation and how can i run the onBlur function only when the field is valid?
There is a isValid()
function in formsy-react, this.props.isValid()
but how i call this function in the input from formsy-semantic-ui-react?
how i can do something like, onBlur={isValid() ? this.updateValue : null}
?
<Form.Input
instantValidation={false}
name="input1"
label="Input 1"
validations="isNumeric"
validationErrors={{
isNumeric: "Enter numeric only"
}}
errorLabel={errorLabel}
onBlur={this.updateValue}
/>