Question

I'm using DotNetNuke 7 for my CMS. I created a custom profile property for zip codes. Does anyone know how to add custom validation for the data entry before allowing the user to register.

Thanks

Was it helpful?

Solution

I don't think DNN allows this in custom properties, you'll likely need to wire something up yourself to make this happen. You might be able to add some custom jquery to the registration page that does some webservice calls to check and validate a property, but I haven't tried that before so it would probably be a lot of trial and error until you get it working right.

OTHER TIPS

Click on the pencil next to the property you created if its only one zip code then in the valid expression area put the zipcode ex:08109 of you wanted to have it at two zipcodes lets say 08109 and 08110 then you could use a validation expression something like this:

  ^[0]{1}[8]{1}[1]{1}[0-1]{1}[0-9]{1}$ 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top