-
30 Aug 2009 5:08 AM #101
i have modified the plugin a bit to allow setting initial 'remote valid' state. for example, when loading a form from db, its not nice to show 'not verified yet' right ahead.
now, you can set 'remoteValid' property initially in field.
Code:... Ext.ux.plugins.RemoteValidator = { init:function(field) { // save original functions var isValid = field.isValid; var validate = field.validate; // apply remote validation to field Ext.apply(field, { remoteValid:!!field.remoteValid //Michael // private ,isValid:function(preventMark) { return isValid.call(this, preventMark) && this.remoteValid; } ...
-
30 Aug 2009 10:06 AM #102
Thank you for the patch.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
1 Sep 2009 9:55 AM #103
does it work with file upload types?
does it work with file upload types?
Is it supposed to work with file uploads also? I have it working with the following code but does not validate when uncommenting inputType.
Code:xtype: 'textfield', fieldLabel: 'Select File to Upload', //inputType: 'file', autoCreate: {tag: "input", type: "text", size: "60", autocomplete: "off"}, plugins:[new Ext.ux.form.ServerValidator({ url:'foo', params:{foo:bar} } )],
-
1 Sep 2009 11:24 AM #104
Saki, possibly another bug:
I think filterServerValidation needs to check for blank fields and disregard the validation if the field is allowBlank:true. I was having some problems when I was tabbing through a set of fields where one of the fields was a remote validator, but it was ok to be blank. (basically, I only validate IF they enter something.)
I changed filterServerValidation to this:
Code:,filterServerValidation:function(e) { if(this.field.value === this.field.getValue() || (this.field.getValue() == "" && this.field.allowBlank)) { this.serverValidationTask.cancel(); this.field.serverValid = true; return; } if(!e.isNavKeyPress()) { this.serverValidationTask.delay(this.validationDelay); } }
-
1 Sep 2009 12:16 PM #105
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
1 Sep 2009 12:41 PM #106
-
2 Sep 2009 2:37 PM #107
I don't know what you are referring to in the docs, there isn't an example with file upload types and not much else there. I've tried changing the validateEvent to 'change' and 'blur' but no async call. Please help.
-
3 Sep 2009 12:07 AM #108
@x5150,
I haven't tried file upload fields with the validator. The first questions to answer would be:
1. does field upload field fire events as text field? If not, then there is little chance to make it working.
2. what getValue() returns?Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
3 Sep 2009 8:20 AM #109
-
3 Sep 2009 3:59 PM #110
So if you set validationEvent:'change' it should work... If not, can you post a showcase?
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video


Reply With Quote
