Hi. I propose to add one property to isValid method to add possibility pass computed value.
It will be helpful when using data binding.
For example I have 2 validation rules for 2 fields: 'name' , 'email';
In this case computed.email value in nameRule will be old and it will be not equal to real email.
If pass 2 arguments (option, computed) into isValid method (this.model.isValid('name', computed)), we can use computed value instead of this.attributes in isValid. If computed was not passed we can use this.attributes
@thedersen What do you think about it? Is it worthwhile?
Hi. I propose to add one property to
isValid
method to add possibility pass computed value. It will be helpful when using data binding. For example I have 2 validation rules for 2 fields: 'name' , 'email';And I want to call
nameRule
formemailRule
In this case
computed.email
value innameRule
will be old and it will be not equal to real email. If pass 2 arguments (option
,computed
) intoisValid
method (this.model.isValid('name', computed)), we can usecomputed
value instead ofthis.attributes
inisValid
. Ifcomputed
was not passed we can usethis.attributes
@thedersen What do you think about it? Is it worthwhile?