Friday, February 10, 2012
  Search
Support Forum
Regular Expressions
Last Post 17 Sep 2008 09:22 AM by Sujay. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Dan
New Member
New Member
Send Private Message
Posts:5


--
16 Sep 2008 01:34 AM  
Hi there,

I'm new to Form Master and loving it.
Also I'm no programmer but adding Regular Expressions is great. I am wondering whether there is much of a need for other Form Master users to share their Regular Expressions with the rest of us. Maybe a link to the forum within the mod so we can quickly find something specific.
I have no idea how to write one, though I am looking for one that requires someone to enter a value greater than 10 into a field.
Cheers,

Dan

Sujay
Basic Member
Basic Member
Send Private Message
Posts:382


--
16 Sep 2008 08:17 PM  
Hi Dan,

You can use regular expression to validate the input format but you can't compare the numeric values.
You can use this expression
\d{2,10}
to force the user to enter a number having atleast 2 digits and atmost 10 digits.
but there is catch that user can enter a single digit with a zero before like 01

Thanks & Regards,
Sujay
Dan
New Member
New Member
Send Private Message
Posts:5


--
16 Sep 2008 10:36 PM  
Hi Sujay,

OK cool I will give it a try.

I managed to do this after much trial and error, but no idea why it worked: \d{1}\d{1,10}

Now to make it work with decimal point eg, where the minimum value of a field must be 1.5. ie: 1.5 kg

Cheers and thanks for getting back to me.

Dan
Steve Provencher
Moderator
Advanced Member
Advanced Member
Send Private Message
Posts:681


--
16 Sep 2008 11:58 PM  
Dan

You can use a compare validator to do This set the control to compare = none, the data type to integer, the rule to greater than and the value to compare to 9

You may also want to use a Required field validator also.

Steve
Sujay
Basic Member
Basic Member
Send Private Message
Posts:382


--
17 Sep 2008 08:23 AM  
Hi Dan,

You can use compare validator with datatype double to compare a value like 1.5

Thanks & Regards,
Sujay
Dan
New Member
New Member
Send Private Message
Posts:5


--
17 Sep 2008 08:36 AM  
Hi Sujay,

Thanks, but you might as well talk to me in French and Chinese. Have no idea what you are talking about, sorry.

I'm a designer doing some funky stuff with your form, well I think it is.

*************
Ok sorry I was being sarcastic.

What you said to me I do not understand, as much as I don't understand French or Chinese.

That is I don't understand the syntax of Regular Expressions.

*************
Sujay
Basic Member
Basic Member
Send Private Message
Posts:382


--
17 Sep 2008 09:04 AM  
Hi Dan,

Sorry i don't know either of the languages.
I was referring to your previous post where you asked
"Now to make it work with decimal point eg, where the minimum value of a field must be 1.5. ie: 1.5 kg "

Thanks & Regards,
Sujay
Sujay
Basic Member
Basic Member
Send Private Message
Posts:382


--
17 Sep 2008 09:22 AM  
Hi Dan,

haa haa, i got it now.
I am not an expert in regular expressions,
Normally i do a search for regular expressions in sites like http://www.regexlib.com/
and modify them if required.
Ofcourse you can find many tutorials online if you want to learn regular expressions.

Thanks & Regards,
Sujay
You are not authorized to post a reply.

Active Forums 4.2
Copyright 2004-2012 Code 5 Systems, LLC.