Validation on character length

Dear all,

I added a new grid with data source to a new table. In the grid there is column called ExterCAtegoryId . The maximum size of this field is 13. So I gave it in the string size. And other restriction is there that the field should allow to save below 13 size. It’s like minimum and maximum to be 13. Please let me know where can I do this ? Also another restriction like it can accept numeric with - symbol.

Thanks

use strlen function

use strkeep to verify

put your code in validate method of the field at form level if that is form specific validation, if it is global then add code in the validateField at table level

Thanks Kranthi,

Strlen I already used it. But strKeep is new for me.I will try with the same in the table level validation code.

Should I write this strkeep method in the update method in the table level? as it has to be saved with the numeric and - symbols values.?

I have written strKeep function in the modified method.

Thanks!!!

it is also validation do it in the validateField method