David0603 All American 12764 Posts user info edit post |
Is there a way to validate fields in a dojo grid without having to use a dojo form? I tried these two methods of creating text boxes with validation with no success.
{ name: 'IP', field: 'col5',widgetClass: dijit.form.ValidationTextBox,regExp:"a",width: 10},
{name: 'Time', field: 'col6', widgetClass:'dijit.form.ValidationTextBox', widgetProps:{regExp:'\\d{4}',invalidMessage:'This number should always be four digits, between 0000 and 2359'} }, 3/16/2012 10:13:34 AM |
CaelNCSU All American 7132 Posts user info edit post |
This looks Java style: regExp:'\\d{4}',
Try this: /\d{4}/
Nevermind... It probably does new RegExp('\\d{4}') which would work.
[Edited on March 16, 2012 at 7:16 PM. Reason : a] 3/16/2012 7:09:33 PM |