Custom validation of a custom field
-
Hi, I just purchased Profile Builder Pro, it’s wonderful so far but I kinda stuck in custom validation. May I know which filter should I use? I created a checkbox’s meta name called “check_allergy”. From the doc “where X is the id of the custom field and can be read from the back-end”, I assume id is the meta name?
This what I have at the moment, it doesn’t work.
function wppb_extra_check_allergy( $message, $field, $request_data, $form_location){
if (‘custom validation here’){
return __( ‘Add your error message here.’, ‘profilebuilder’ );
}
return $message;
}
add_filter(‘wppb_register_input_custom_field_check_allergy’,’wppb_extra_check_allergy’, 10, 4);The documentation doesn’t should the function passing parameters, I got it from google search.
- The topic ‘Custom validation of a custom field’ is closed to new replies.