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 commentedThis can be achieved by using the "regular expression" validation rule, with the special character ^ (= "starts with"). For instance, ^800
Comment #2
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.