Enome / knockknock

Simple validation for Knockout.js
Other
14 stars 0 forks source link

Validation validate is incomplete #4

Closed Enome closed 13 years ago

Enome commented 13 years ago

At the moment it just runs validate on all validators in the cache. But validation should also have a isValid observable.

Something like:

validation.validate();

if( validation.isValid() ){
      //Add to database.
};

Maybe isValid should execute validate on all validators.

Enome commented 13 years ago

Instead of adding isValid Validation.validate will now return true or false.

thelinuxlich commented 13 years ago

A global isValid would be nice for a common use case like disabling form submit button if there is any invalid field.

Enome commented 13 years ago

Sounds great I'll add it to features.