Gossamer Forum
Quote Reply
Form Regex
Hi,
Can someone explain me what kind of Regex I have to give a
links select field, so that the: - of the selectfield will be not accepted.
for example: I have a select field called "Country"
and in the add page you have to select.
-
Country1
Country2
Country3
Country4
Country5

Now, I dont want that the user makes no selection and linkssql shouldnt accept the "-".

Who can help me with the Form Regex?

Quote Reply
Re: Form Regex In reply to
Smile
You will want it to produce the error page I expect?, so.....

(This may/may not work)......

unless ($IN->param('Country') =~ s/[a-zA-Z]/) {
print $IN->header();
print Links::SiteHTML::display('error', { error => Links::language('ERROR')});
return;
}

ERROR will need to be replaced with the error name.




Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/