I Cannot Restrict an accented character in text field

Hello - we are running into an issue where we use Gravity Forms to connect to a user database, we have a user that consistently uses an accented i in their username and it does work to connect to the database but doesn’t work when we try to display the submission data in a view.

I feel like the easiest solution is to require no accented characters using field validation but it is not working, I tried the snippet below, it works if I replace the í with @,$,% etc. but it won’t work with the í :

add_filter( 'gform_field_validation_14_70', 'validate_userid', 10, 4 );
function validate_userid( $result, $value, $form, $field ) {
     if ( $result['is_valid'] && (mb_strpos($value , 'í') !== false)) {
        $result['is_valid'] = false;
        $result['message'] = 'Only standard characters are allowed';
    }
    return $result;
}

Hi mat. Try logging $value to see what it contains. It’s possible the character is being encoded and you’re not finding it because of that. You can add this line as the first line of your function:

GFCommon::log_debug( __METHOD__ . "(): This is what Value contains:\r\n{$value}" );

That will only be useful if you first enable logging for the site. You can enable logging by going to Forms > Settings > Logging. Select: On, then [Save Settings]. By default this will enable all logging on your site. Documentation for Enabling Logging: https://docs.gravityforms.com/logging-and-debugging/#enabling-logging

After enabling logging, please test the form with that additional logging line added to your code.