Looks like we can't reproduce the issue or there's a problem in the test case provided.
Presence validator acts wrong with MVVM
Presence validator acts wrong with MVVM
I have a model with this validator :
Code:
validators: {
UnitPrice: 'presence',
No: 'presence',
},
But it doesn't work when modelValidation: true and the value is empty, so I overrided it in the following way to have a correct behavior :Code:
Ext.override(Ext.data.validator.Presence, {
validate: function (value) {
if (value == '') return false;
return this.callParent(arguments);
}
});
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
mercredi 2 juillet 2014
Presence validator acts wrong with MVVM
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire