Friday, March 26, 2010

Pattern Validation...????

Hello

Is it possible to write a custom pattern validation to suit a phone number etc......

If any one could help with this it would be great or tell me where to go looking..

Cheers

Pattern Validation...????

You can declare any number of patterns for display, validation, and edit. Take a look at the following:

http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/000843.htm

http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/000842.html

The base URL for Designer LiveDocs is http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/js/html/ wwhelp.htm

Steve

Pattern Validation...????

Steve

The first to link don't work it say they are broken.

Cheers

Whoops. Copy and paste problem.

http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/000843.html

Steve

Thanks for your help so far....

I'm still not 100% sure.. I'm I able to create a custom patten and save it if so how.... Can I change a default pattern and it's name and save it if so how...

Thanks
Jake

Jake,

You can use the predefined patterns as a template and create your own, but there is no officially supported way to save the pattern.

Steve

Steve

What is the best way to create a custom pattern... is it best to do it over a existing one or what... i can find any docs that tell you how to write them... can only find some examples...

Cheers

Patterns are admittedly confusing. I tend to use JavaScript to do formatting and validation because script objects can be saved and re-used.

Take a look at the predefined telephone pattern...

text{'('999')' 999-9999}

You are free to use the pattern syntax rules and create your own. For example,

text{'+1 ('999') '999-9999

The comma (,), dash (-), colon (:), slash (/), period (.), and space ( ) are treated as literal values and can be included anywhere in a pattern. To include a phrase in a pattern, delimit the text string with single quotation marks (').

I recommend that you go to the base LiveDocs URL for Designer, go the Index, click 'P', and scroll to 'patterns'. There is a lot of doc.

Steve

Thanks for your help.....

Dio you think it would be better to write this script in Javascript. If so how is the best way to do it......

Thanks

Jake,

I can't say there is a best way. The method you choose could be based upon personal preference, departmental guidelines, or organizational policy.

LiveCycle Designer ES enables less technical people to apply patterns to data capture and submission. The attached sample demonstrates the other end of the spectrum - the use of JavaScript, a script object, and regular expressions. If you are not fluent in JavaScript or regular expressions, the sample 'may do more harm than good'. The sample was created to validate a telephone number in Ireland.

Do a search on this forum and you will find numerous postings on this topic.

Steve

Steve

That is what i'm looking for..... Is it possible to get a copy of the Livecycle file Please...

Cheers

The sample is attached and should be accessible, above. If you cannot access it, send me an email at stwalker.adobe@gmail.com.

No comments:

Post a Comment