Customize the validation format and generate custom messages
add_filter('pchntv_ajax_return_format' , 'pchntv_ajax_return_format_custom_code' , 1, 10); function pchntv_ajax_return_format_custom_code ($return_format){ $municipalities = [ 'GM0344', //Gemeente Utrecht 'GM0935', //Gemeente Maastricht ]; if(in_array($return_format['adres' ]['municipality_code'], $municipalities)) { return $return_format; } $return_format['adres']['error' ] = true; $return_format['adres']['message' ] = 'Uw adres is niet geschikt'; $return_format['adres']['found' ] = true; return $return_format; }
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article