Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
thanks alot for this great module.
Is it possible to add a "Starts with" functionality to this module.
For example I want the webform to only accept the numbers that start with "800". So any number with 800xxxxx would be accepted. others not.
x = anynumber
It would also nice to able to define a specific formula like make the webform to only accept "800xxxx8xxxx8".
I want to use a webform to gather lottery code numbers and I need it to only accept valid codes!
I think that remaining feature would make this module perfect!
Comment | File | Size | Author |
---|---|---|---|
#5 | webform_validation_1401724_start_end_with.patch | 2.43 KB | Liam Morland |
Comments
Comment #1
bart.hanssens CreditAttribution: bart.hanssens commentedThis can be achieved by using the "regular expression" validation rule, with the special character ^ (= "starts with"). For instance, ^800
Comment #2
bart.hanssens CreditAttribution: bart.hanssens commentedComment #3
Liam Morland"needs review" should only be used when a patch has been submitted.
Comment #4
Liam MorlandBoth the starts-with and the pattern can be done with regular expressions. I expect that many users who do not know regular expressions would want to do simple things like starts-with. Webform Validation already has rules which do things that can be done with regex, so I think this is a reasonable feature request. For now, you can use regex.
Comment #5
Liam MorlandFixed in ffe73af. Patch as-committed attached.
The pattern can be done with regex or #1082134: Pattern validator would do that too, once finished.
Comment #6
Liam MorlandComment #7
Liam MorlandDrupal 6 is no longer supported.