"For a reference to be valid, the three letter group must be one of ‘ACT’, ‘ABQ’, ‘ ‘BDE’. Anything else is invalid."
My code is below but it doesn't seem to be working as intended. Could somebody please point me in the right direction. Thanks.
if (isset($webdata['bookingreference'] )) {
if (!preg_match("[ABQ,ACT,BDE]{1}[-]{1}[1-2]{1}[0-9]{3}", $webdata['bookingreference'])) {
$formerror['bookingreference'] = '<span class="warn" >Not valid on server: The ref must start with ABQ, ACT or BDE, followed by a hyphen, then either the numbers 1 or 2 followed by two more numbers 0-9';
$valid = FALSE;