This is a migrated thread and some comments may be shown as answers.

Inline Email Address Validation

1 Answer 321 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vauneen
Top achievements
Rank 1
Vauneen asked on 05 Apr 2012, 12:24 PM
Hi all

i have a grid (php/json datasource) and inline editing.

i need to validate the email address field but i have a problem.

if i define the field like this in my datasource.schema.model.fields :
EmailAddress:         { validation: { required: true}, type: "email" },
then validation works perfectly when editing existing entry.
but adding throws an error. (i dont think 'email' is a valid 'type')

i think i'll need to define the field like this:
EmailAddress:         { validation: { required: true}, type: "string" },
and validate the entry with a regex. but i cant figure out how.

i though i could add a 'format' to the above 'validation' tag but that doesnt work....

does anyone have experience with this please? i've very stuck.

thanks,
Vauneen



1 Answer, 1 is accepted

Sort by
0
Sarvesh
Top achievements
Rank 1
answered on 07 May 2012, 01:38 PM
Facing the same issue, havent been able to find a solution for this issue yet. I get the error message "EmailAddress is not defined" in firebug.
Tags
Grid
Asked by
Vauneen
Top achievements
Rank 1
Answers by
Sarvesh
Top achievements
Rank 1
Share this question
or