NewOldMax / react-form-validator-core

Core validator component for react forms
MIT License
95 stars 44 forks source link

dropdown and desc input type validation is not here. #49

Closed DeepakM02 closed 5 years ago

DeepakM02 commented 5 years ago

There are validators for text. I want to use these validator for select, desc and other input type along with text type. I am not getting what should I do.

NewOldMax commented 5 years ago

Validator checks the value of component props. You should just pass it. What problem do you have?

DeepakM02 commented 5 years ago

I am not able to get whole form validity and use form validator in select, desc input type. when I use in desc then it converts to input type text. How to add validation rules with multiple parameter.

NewOldMax commented 5 years ago

can you reproduce your issue here?

DeepakM02 commented 5 years ago

Yeah, Finally I have added link I applied validator for input type text but for type select, desc, and others it is not working and I am not able to use form methods means how to disable button if a form is invalid.

NewOldMax commented 5 years ago

You're using this library wrong. You should create your own SelectValidator component in the same way as TextValidator in readme. Also there is no <input type="select">, but <select>

DeepakM02 commented 5 years ago

yeah I did as you said above but it did not work i will share the code and I am not able to use forms method to disable submit button when form invalid.

NewOldMax commented 5 years ago

you should use options={this.options()}

NewOldMax commented 5 years ago

https://codesandbox.io/s/v6n31l8700