Hi Guys,
Once a person has entered his/her email address in a textbox, how do I validate that it's in a proper email format, e.g. eyezpe@eye.com?
The manual says that I can set the textbox type to 'email':
scirra.com/manual/117/textbox
But how do I validate it, and if it's non-email format, then how do I return an error?
EDIT June 4, 2012 - I've figured it out.
You can use the system expression - tokencount.
From the manual:
"tokencount(src, separator)
Count how many tokens occur in src using separator. For example, tokencount("apples|oranges|bananas", "|") returns 3."
I did tokencount("bob@bob.com", "@") to check for the number of 's (there should only be one).
Then did the same for "."'s.
Regular expressions would have been better, but this kind of works.