Saturday, December 8, 2007

Helpful PL/SQL Expressions for Form Validation

Here are a few form validation functions that I am finding helpful:

Email Checking:
instr(:p2_per_email,'@',1,2) <= 2 (this expression checks for only one @symbol)
REGEXP_LIKE(:p2_per_email,'.int') (this expression returns true or false if the .int string is found in the string variable).


Text input checking
to_char(:p2_per_rank) != 'CAPT, MAJ'
(this expressions checks to make sure that the string matches one of the forms provided...CAPT, MAJ)

No comments: