Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Regex help for field validation
Last Post 03-30-2011 08:26 AM by Ryan Bakerink. 14 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
sschleifferUser is Offline
wading in the water
wading in the water
Posts:21
Avatar

--
02-24-2011 12:59 PM
    I want to have a user's textbox entry be validated for an exact match against a particular string (like a password, but NOT a password). 

    Let's say the string is 4X_a707nb.

    What would I put in the validation regex field in the DF module?
    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    02-24-2011 01:26 PM
    Hi sschleiffer,

    You can try the compare validation you'll find when you edit the field under Field Validation.

    Thanks!
    Candace
    sschleifferUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-24-2011 02:55 PM
    I'm trying to get the user to enter a string they are given into a single textbox field and then click submit from this DF module. 

    That string, once validated somehow, will let the completion events fire, among which is a URL redirect to the real user profile page.

    This is a part of my user organization driven complexity in registration and forms (paper ones) completion.

    I tried a variety of combinations for regex and comparison thinsga nd get nowhere.My last effrot was to create a hidden textbox with an default value and compare the visible one to that.  Since I have been typing in a wrong string every time on purpose, I know the comparisons are failing because it redirects me anyway.

    Can you be more specific about a regex for my original quesiton, OR, more detailed in how to apply the comparison.

    I have and have read the UG, but it not detailed enough for this question.  E.g. do these strings need quotes around them in the regex or comparison Field Validation page settings?
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    02-25-2011 06:42 AM
    Hello sschleiffer,

    You can take the approach of using SQL validation for this functionality. Is the string going to be static(won't change) or will it be dynamic(change)??

    You can find SQL validation under Module Configuration -> Validation Configuration.

    If it is a static value then the SQL validation will work best. You can add conditions in your SQL validation in case the string value can be dynamic.

    If you have any questions please let us know.

    Thanks,

    Ryan
    sschleifferUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-25-2011 08:31 AM
    Now you are suggesting I try a third means of validating this string. Is it not possible to do this with a regex, OR your Comparison thing, under the files's Field Validation?

    The string will be static, until the Admin changes it, in case it gets compromised. So, it needs to be editable by the Admin, but I expect not often.

    I need to know a Regex and the syntax for it, to place in the field on the Field Validation section, OR,

    I need to know how to configure the Comparison section.

    The UG is not detailed enough.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    02-25-2011 10:34 AM
    Hello sschleiffer,

    The most logical path is to use SQL validation or a compare validator on this question. It's really a coin toss.

    For the compare field, you will need a hidden field that collects the static string value, from which ever table column you're storing it. You will have a question that's a textbox with a compare validator using the hidden field as the field to compare. This is easy to do.

    For SQL validation, basically declare a SQL variable, gather the value the user entered and assign it to this variable. Now use a condition / compare the variable against the actual value. If the variable value doesn't match then invoke an error message. If true accept the submission of the form or whatever you're doing. This is easy to do.

    The least logical path is to use a regular expression. What if the admin changes the string?? Then the regular expression will most likely have to change. This is possible, but the difficulty will ultimately make you lose sleep and cause frustration.

    If you have any questions please let us know.

    Thanks,

    Ryan
    sschleifferUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-25-2011 10:51 AM
    Posted By Ryan Bakerink on 02-25-2011 12:34 PM
    Hello sschleiffer,

    For the compare field, you will need a hidden field that collects the static string value, from which ever table column you're storing it. You will have a question that's a textbox with a compare validator using the hidden field as the field to compare. This is easy to do.


    I have most recently been trying to use a hidden filed with a sort order before the user entered question field. I had set a "default" value of the static string in that hidden field. I set up the question field with the compare check box and the hidden field selected from the dropdown.

    It passes anything I enter including nothing. Should I turn of the "required field" stuff? Does the Compare text fle dneed the statis string as well?

    THIS IS AN EDIT after the below post.
    sschleifferUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-25-2011 10:54 AM
    Okay, this is not the first tme I have had this other new problem. I just quoted the above, made minor edit to the quote and then wrote a lengthy reply with new questions and after it posts, the only thing there is the quote, before I edited it. Is this the most current AF or is it suffering from 5.6.1 as well?
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    02-25-2011 10:58 AM
    Hello Sschleiffer,

    This is the most recent AF, and it seems to have difficulties.

    Make sure you copy your response before trying to post.

    Thanks,

    Ryan
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    02-25-2011 11:17 AM
    Hello,

    I would use JavaScript Alert's to see the value in your hidden field or make the hidden field a text box so during testing, you can get the Compare field to work. Once you have it working, then change it back to a hidden field.

    Thanks,

    Ryan
    sschleifferUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-26-2011 09:31 AM
    Okay
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    02-28-2011 09:12 AM
    Hello Sschleiffer,

    Please let me know if this technique helps you to accomplish the functionality you want.

    Just keep me updated.

    Thanks,

    Ryan
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    02-28-2011 11:08 AM
    Posted By Ryan Bakerink on 02-25-2011 12:58 PM
    Hello Sschleiffer,

    This is the most recent AF, and it seems to have difficulties.

    Make sure you copy your response before trying to post.

    Thanks,

    Ryan

    Ugggh....I just had to edit this again.

    It happens to me quite often.  I reply and my submission disappears. Also, if I quote, my reply disappears too.  It gets frustrating to retype my responses.  Sorry to hijack the topic.

    I wanted you to know it happens quite often for me.

    Thanks,
    Chuck
    sschleifferUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-28-2011 12:50 PM
    See this for the conclusion
    The Elegant Solution is always the simplest
    http://www.datasprings.com/products.../aft/23507

    Thanks to Candace and Ryan for their patience and help.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    03-30-2011 08:26 AM
    Hello Steve,

    Thanks for the reference to the resource you've created for everyone.

    If anyone has any questions please let us know, and I'm sorry about the Active Forums Chuck. I find that I will always copy the HTML of my post before I try to submit. That way I won't have to type my response again.

    Thanks,

    Ryan
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi