• Resolved fburatti

    (@fburatti)


    Great plugin, congratulations.
    I wonder if there is a hook to insert a custom validation (php server side validation not js) for a field (e.g. vat number)

Viewing 1 replies (of 1 total)
  • Plugin Author easyregistrationforms

    (@easyregistrationforms)

    @fburatti,

    Thank you for contacting us. You can use one of our filters to hook your custom validation rules. Here is the sample code:

    apply_filters(‘erf_custom_validation’,$errors,$form,$data);

    Within your functions.php file:
    add_filter(‘erf_custom_validation’,’form_custom_validation’,10,3);
    function form_custom_validation($errors,$form,$data){
    $errors[]= array(‘error_slug’,’your error message’);
    return $errors;
    }

Viewing 1 replies (of 1 total)

The topic ‘Custom validation for input field’ is closed to new replies.