Thank you for reporting this bug. We will make it our priority to review this report.
Presence validation excepts an empty space
Presence validation excepts an empty space
The Presence model validation accepts an empty space as valid input. This should probably protect against a user entering an empty space to bypass validation. We put in this override
Ext.define('Ext.overrides.PresenceValidator',{
override: 'Ext.data.validator.Presence',
validate: function(value) {
var valid = !(value === undefined || value === null);
if (valid && !this.getAllowEmpty()) {
valid = !(value === '' || (Ext.isString(value) && Ext.String.trim(value) === ''));
}
return valid ? true : this.getMessage();
}
});
Presence validation excepts an empty space
Aucun commentaire:
Enregistrer un commentaire