Answers for "gform french phone regex"

PHP
0

gform french phone regex

/** this code is used for wordpress plugin "gravity form"*/
	/** Put this code on you're function.php file theme */

    add_filter( 'gform_phone_formats', 'fr_phone_format' );
    function fr_phone_format( $phone_formats ) {
        $phone_formats['fr'] = array(
            'label'       => 'FR',
            'mask'        => false,
            'regex'       => '/^((\+)33|0)[1-9](\d{2}){4}$/',
            'instruction' => 'Format incorrect',
        );

        return $phone_formats;
    }
Posted by: Guest on February-18-2021

Browse Popular Code Answers by Language