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

09/20/2006 9:12 AM  


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?



Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI

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:

Here is some info from">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


Lee Sykes's Facebook Profile
Richard Toner
Nuke Newbie
Nuke Newbie

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