Open senthilmca90 opened 5 years ago
Hi, any update on that? @senthilmca90 did you managed to find the solution
My suggestion would be to define the validator above the input maybe in the top of the render() method for example and assign it to a variable. That way you can use the response to check if you should show a different border for the input and show the message below for example. If nothing is returned that means validation passed and will be null. Something like this:
render() {
let emailValidator = this.validator.message('email', this.state.email, 'required|email')
return (
<div>
<input className={emailValidator ? 'border-red' : 'border-default'} ....../>
{emailValidator}
</div>
)
}
how we do this in react native ?
Hi, this is finding simple validation, but while hitting the submit button the input box is not showing red color
anyone can help me how to write condition red color bor.