How to enable email validation field

Hi,

I believe there may be a small misunderstanding.

The Regex option is available only for Text attributes, so it cannot be applied to an Email attribute.

Additionally, the email field used in the registration or sign-in form is a built-in field, so it can’t be controlled or modified by creating a custom Email-type attribute.

If you’d like to apply specific validation rules to the email used during registration, this would require a code snippet. You can try the solution from this topic and adjust it to your needs [How to add custom code snippets - HivePress Help Center]: Restrict sign-up to only specific domains - #4 by kseniia

Or use this one with your adjustments:

add_filter(
    'hivepress/v1/forms/user_register/errors',
    function ( $errors, $form ) {
        $email = $form->get_value( 'email' );

        if ( $email && ! preg_match( '/(?=.*\d)(?=.*[A-Za-z])(?=.*[!@#$%])/', $email ) ) {
            $errors[] = 'The email should contain at least one big letter, one small letter, and a special character';
        }

        return $errors;
    },
    1000,
    2
);

Hope this helps