From m204wiki
Revision as of 18:38, 31 July 2014 by Mlarocca (talk | contribs) (Mlarocca moved page $VERIFY to $Verify: Lower case change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $VERIFY function returns a 1 (true) if every character contained in the string is present in the second string. Otherwise, 0 (false) is returned. If the second argument is a null string, 0 is returned. If the first argument is a null string but the second argument is not, a 1 is returned.

$VERIFY can be used whenever $ALPHA, $ALPHNUM, and $VNUM do not provide sufficient flexibility.

Example 1

$VERIFY('1975','0123456789') equals 1 $VERIFY('-19.5','0123456789+-.') equals 1 $VERIFY('12A','0123456789') equals 0

Example 2

$VERIFY('ABC',") equals 0 $VERIFY(",") equals 0 $VERIFY(",'1234567890') equals 1