Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Regex - Validation

Quote Reply
Regex - Validation
Hi all,

i still have not all needed regex, so i hope you find my answers :-)

1. Only numbers "1-0" and "-" and "/" only one word. =>1/-1212/-1
2. The same but with "spaces" (more than one words) => 1/-23 23-/12

3. "Unsigned" in SQL means only numbers, what is to do for only numbers and spaces

4. What means "unsigned zerofill?"and "binary" ?

Robert



Quote Reply
Re: Regex - Validation In reply to
Hmmm, in Links 2.0 the right syntax for
URL and email was:

^http

.+@.+\..+

Seems that wont do it in SQL:

What should i use for:

need http:// at the beginning and
something dot something

means http://something.something

and what for:

something @ something dot something

means
something@something.something

I hate this really :-)


By the way, if someone is getting stupid while fixing the error-messages while adding, try the following to change the message:

Small pattern matching in dbsql.pm.-(sub _validate_record):

if (@errors) {

...



$output=~ s/Title/This is my new error-message/g; #

$output=~ s/Description/lulalela/g;#

output=~ s/Contact_Name/Just one more/g; #

$output=~ s/Contact_Email/Give in your email/g; #



return $output;