You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to add validation for zipcode in textvalidator.
Like Below
<TextValidator
ref='zipCode'
hintText="ex. 00000"
name='zipCode'
onBlur={this.handleBlur}
onChange={this.onChange}
value={this.state.zipCode}
validators={['required','matchRegexp:^\d{5}$']}
errorMessages={[ 'Field is required','Zip Code should have 5 digits']}/>
OR
<TextValidator
ref='zipCode'
hintText="ex. 00000"
name='zipCode'
onBlur={this.handleBlur}
onChange={this.onChange}
value={this.state.zipCode}
validators={['required','minNumber:5', 'maxNumber:5']}
errorMessages={['Field is required','Zip Code should have 5 digits','Zip Code should have 5 digits']}/>
Both the ways are not working. Please help me on this issue
The text was updated successfully, but these errors were encountered:
I was trying to add validation for zipcode in textvalidator.
Like Below
<TextValidator
ref='zipCode'
hintText="ex. 00000"
name='zipCode'
onBlur={this.handleBlur}
onChange={this.onChange}
value={this.state.zipCode}
validators={['required','matchRegexp:^\d{5}$']}
errorMessages={[ 'Field is required','Zip Code should have 5 digits']}/>
OR
<TextValidator
ref='zipCode'
hintText="ex. 00000"
name='zipCode'
onBlur={this.handleBlur}
onChange={this.onChange}
value={this.state.zipCode}
validators={['required','minNumber:5', 'maxNumber:5']}
errorMessages={['Field is required','Zip Code should have 5 digits','Zip Code should have 5 digits']}/>
Both the ways are not working. Please help me on this issue
The text was updated successfully, but these errors were encountered: