Checking value in a field
Last Post 10/05/2006 5:10 PM by Richard Toner. 2 Replies.
Author Messages
Drake Yi
Nuke Newbie
Nuke Newbie
Posts:1


--
09/20/2006 9:12 AM  

Hello,

In the Manage Profile section, how do I create a check on a required field for the data that is filled in?  For example, if I have Telephone as a required field, how do I make it check the data so that somebody does not fill it in with text but make them fill it in with numbers?

Thanks,

Drake

Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
09/21/2006 5:15 AM  
Hello you need to implement a validation expression in the profile properties, here is an excellent article which outlines all of the info you need:

http://www.siteexperts.com/tips/fun.../page3.asp

Here is some info from http://www.dnncreative.com/Tutorial...fault.aspx">this article regarding the Profile Properties:

Validation Expression: should be used for checking that the data entered is in the correct format. You can provide a regular expression to validate the data against (only valid for Text data types).  For instance [\w\.-]+(\+[\w-]*)?@([\w-]+\.)+[\w-]+ can be used to enforce a valid email address (somename@somesite.something).

For further information, simply Google ‘Validation Expressions’ or ‘Regular Expressions’.
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
Richard Toner
Nuke Newbie
Nuke Newbie
Posts:2


--
10/05/2006 5:10 PM  
I have tried this on a field that I am making (date of Birth) but it does not seem to validate the field. Here is what I have:

Property Name: Date of Birth
Data Type: Text
Length: 10
Default Value:
Validation Expression: (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d
Required: false
Visible: true


Can someone tell me why when I hit save in any users profile and put anything that is not a valid date (ie, age like 26) it does not validate. Also I am using 3.3.5

Thanks
Rick


---