> I want to check a field for one of two conditions: The field must be > either blank or match the regex /^45[0-9]{8}$/. Try something like: po_good=required po_number = regex " ^(45[0-9]{8}$)" "You must enter a valid PO number" This should work. At least works for me.