add_filter('gform_field_validation_1_2', 'validate_uk_postcode', 10, 4);
function validate_uk_postcode($result, $value, $form, $field) {
// UK postcode regex pattern
$pattern = '/^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|'.
'(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|'.
'(([A-Za-z][0-9][A-Za-z])|'.
'([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})$/';
if (!preg_match($pattern, $value)) {
$result['is_valid'] = false;
$result['message'] = 'Please enter a valid UK postcode.';
}
return $result;
}
Refer a Friend - InsureTaxi
Refer a Friend
Refer a Friend to insureTAXI and we’ll give you £75 for EVERY person that joins us!*
How it works
Simply ask your friend to type their details into the form, alongside a few of your basic details and we’ll contact them.
Even if they are not due for renewal, please ask your friends to fill in their details and we’ll call them back at renewal time.
*Once your friend takes a taxi policy out with us, payment will be made after 30 days via BACS transfer, their policy must be live and you must be an insureTAXI client. Offer expires 30th January 2025. Our RAF offer only applies to annual policies not short term taxi insurance.