|
The only thing I can think of (because there is no real way to validate something like that) is to ensure that they enter a first/last name format. ie XXXX XXXXX. If they go that far to avoid entry, you've done all you can do. Basically ensure that there is characters, at least one space, and trailing chars after the space. As programmers we can only do so much, but if the user chooses to enter garbage info then there's not much you can do. Also, what you could do is stamp the user name on the record as it's created and that may cause the users to be more careful with their data entry, if they know someone can track the garbage data to them. Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 709-576-8132 rpower@xxxxxxxxxx http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Eric A. Wolf" <eric_a_wolf@xxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 2005/08/25 04:01 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc Subject Checking for replication of characters in a field To the list, I am trying to create a utility to prevent users from entering insignificant data in a field. For example, if the user is required to enter a Contact Name (which cannot be verified against any table), I can check for blanks and issue an error. However, if the enter a ".", "X" or all "*", an error will not be issue. Has anyone written something like this (or similar) to handle this? I could write a routine to go through every character on the keyboard to test IF fieldname = *all'x' but what about just checking for three AAA's or 999 in a 20 character field? TIA... Eric Wolf
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.