EasyUI Forum
September 14, 2025, 10:55:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Using Validate Type in an editable Datagird [Resolved]  (Read 7592 times)
dies_felices
Newbie
*
Posts: 24


View Profile
« 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}



« Last Edit: August 13, 2015, 12:31:08 PM by dies_felices » Logged
dies_felices
Newbie
*
Posts: 24


View Profile
« Reply #1 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.
Logged
dies_felices
Newbie
*
Posts: 24


View Profile
« Reply #2 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.
Logged
dies_felices
Newbie
*
Posts: 24


View Profile
« Reply #3 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/
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!