Title: Using Validate Type in an editable Datagird [Resolved] Post by: dies_felices on August 11, 2015, 12:39:25 PM Hi,
I'd like to check for SHA1 hashes. Please this example: http://jsfiddle.net/3L4ej4dx/87/ Ideally, the rule would be follow the regular expression form [0-9a-fA-F]{40,40} Title: Re: Using Validate Type in an editable Datagird Post by: dies_felices on August 12, 2015, 01:11:56 PM The issue seems to be that no matter how the validatebox property is defined, I can not get it to trigger validation.
Title: Re: Using Validate Type in an editable Datagird Post by: dies_felices on August 13, 2015, 11:16:29 AM Hi,
In this example the validType is picked up. All that remains is for the correct evaluation of the SHA1 type. http://jsfiddle.net/3L4ej4dx/88/ To pick up the validate type the column is described as follows: Code: {field:'SHA1',title:'HASH Code',width:'10%',align:'center',editor:{type:'textbox',options:{validType:'SHA1'}}} It all comes down to the curly braces you see. Title: Re: Using Validate Type in an editable Datagird Post by: dies_felices on August 13, 2015, 12:30:41 PM The final issue to remain was to extend the validation.
This turned out to be a question of where the extension code block was placed. When at the beginning of the code it did not register. Preceding the function did the trick. Please see this jfiddle for a working example: http://jsfiddle.net/3L4ej4dx/90/ |