heilhead / react-bootstrap-validation

Form validation for react-bootstrap
MIT License
136 stars 50 forks source link

disable submit button until form is valid #10

Closed LoicUV closed 9 years ago

LoicUV commented 9 years ago

Is there a simple way to disable the submit button of the form when the form is invalid ?

LoicUV commented 9 years ago

As I only had one input in my form I used a state variable I changed in the validate method of that input.

heilhead commented 9 years ago

There's no way to do this currently, but I plan on adding additional callbacks to form element to make this possible.

camsjams commented 8 years ago

In the meantime - are there any methods available to accomplish this?

camsjams commented 8 years ago

@heilhead my colleague @JasonTsao made a very slight PR change for this feature, can you take a look and merge in if you approve?

https://github.com/heilhead/react-bootstrap-validation/pull/42/files

Also might be relevant to you @LoicUV if you are still interested.