Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom validation xprofile field

  • Hello everyone

    I’m trying to add custom validation to a custom xprofile field. But it seems like I can’t access the fields’ values. The code below is added to my functions.php, but doesn’t seem to work.

    The $field-variable is always NULL, though it is set as a parameter in the bp-xprofile-classes.php file on line 865.

    This is the code on line 865 is
    `return apply_filters_ref_array( ‘xprofile_data_is_valid_field’, array( (bool)$retval, &$this ) ); `

    And this is the code that doesn’t seem to work in my functions.php
    `add_filter( ‘xprofile_data_is_valid_field’, ‘pbd_admin_is_valid_field’ );

    function pbd_admin_is_valid_field($retval, $field)
    {
    var_dump($field);
    } `

    Any help is welcome, many thanks in advance!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom validation xprofile field’ is closed to new replies.
Skip to toolbar