a best practice would be to use whitelisting instead of blacklisting, so say: only [A-Z] and [a-z] and [EMAIL PROTECTED]&] so on.
I guess you can pull this off using a guide but I am not sure how this would impact performance, I think it would not be really great.
If you have the skills at hand, using Perl, and especially the arfperl plugin, might be a fast and nice solution for this.
Look at this URL for an article on the Remedy website on this topic:
http://www.remedy.com/customers/dht/archive/10-20-2003.htm
Kind regards,
Michiel
**__20060125_______________________This posting was submitted with HTML in it___Hello
I've been asked to put some validation against some of our name and add ress fields. These are entered on a display only form, and need to be validated on a button push (ie well before the call has been submitted).
Typical rules for the various fields are:
1. can contain alpha characters and hyphens (-), but no other control characters
2. must contain numbers only
3. can contain alpha characters, full stops(.) and apostrophes(' ) but no other control characters
4. can contain alpha charactors and forward slashes(/) but no other control characters.I'm not sure of the best way of checking for almost all control characters. Also I 'd like to find a neat way of doing this that means the code can be reused or amended without too much hassle. Thoughts so far:
Option 1
Create a form called PatternMatch, which will contain FieldName, P attern (eg "[a-A][a-A] ") and ErrorMessage. It would then have a display only field and when the pattern match test is run, the value in the field being tested would be pushed through the display only field and would generate a user-friendly error if it didn' t match the pattern.
Problems: I can't find full documentation for this pattern matching, and I 'm not sure if its flexible enough to handle rules 1, 3 and 4 above.
Option 2
Use SQL?
Option 3
Use a guide. Create a form that stores all the possible control characters as individual record s (eg ! " £ $ etc) then retrieve each record one by one and check if FieldToCheck LIKE "%" +$ControlCharacter$+"%" . And then find some way of making exceptions for control characters that are only allowed in certain fields …
Option 4
Something completely different involving ascii codes or something.
Any thoughts on the best approach?
ARS Version 5.0 (soon to be 6.3, all going well)
Solaris 9
Oracle 9
Internal: 31484
External: 0141 418 1484
Support Scotland's Bid to host the 2014 Commonwealth Games in Glasgow - visit www.glasgow2014.com
----------------------------------------------------------------------------
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this message.
Glasgow City Council cannot accept responsibility for viruses, so please
scan attachments. Views expressed in this message do not necessarily reflect
those of the Council who will not necessarily be bound by its contents.
----------------------------------------------------------------------------
__20060125_______________________This posting was submitted with HTML in it___

