has anyone tried to do CFForm validations using regular expressions. the simple one i tried is for alphanumeric characters. it does not seem to work. It validates all the predifened validate types like zip,email etc.. but i want to do a custom validation. any help will be appreciated. Thanks.
I'm running into the same problem. The following code works fine when format=html, but doesn't work at all when format=flash: <cfinput type="text" name="Month" label="Month:" validate="regular_expression" pattern="([0-9]{2,})" message="You must enter two digits!" required="yes" width="75" maxlength="2"> I was so impressed with the new flash form until this. Anyone have an idea what we might be doing wrong? Thanks also, Dave
Regular expressions don't work with Flash format. The following is from the validation types documentation regarding regex or regular_expression oo cfinput: Matches input against the pattern attribute. Valid in HTML and XML format only; ignored in Flash format. http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/ wwhelp.htm?context=ColdFusion_Documentation&file=00000279.htm Ted Zimmerman
Thanks Ted, I almost did not read that part of the documentation. However, i got it working. validateat=",onServer" validate="regular_expression" pattern="<some custom expression>" this is not the best solution for onsubmit handling.
I wanted to throw my thanks in, also, esp. for sending the link. I lost a couple hours on that one. Thing is, I read my documentation. I'm using Forta's latest web application construction kit. It seems as though he forgot to add that last part. If you look in Table B.81, you'll see the part about not working in flash is missing. Dave
Don't see what you're looking for? Try a search.
|