Hi @vjdoon,
Hope this message finds you well.
<?php
add_filter(
'forminator_custom_form_submit_errors',
function( $submit_errors, $form_id, $field_data_array ) {
$field_name = 'name-1'; //change the field name here
$submitted_fields = wp_list_pluck( $field_data_array, 'value', 'name' );
if( !preg_match( '/^[a-z]+$/i', $submitted_fields[ $field_name ] ) ) {
$submit_errors[][ $field_name ] = __( 'There is something wrong ' );
}
return $submit_errors;
},
10,
3
);
This is a mu-plugin that will allow only alphabet characters, not numbers or special chars. You will find a guide about how to install a mu-plugin on this link.
Let us know if you require additional assistance.
Best regards,
Laura
Hi @vjdoon ,
I believe the code shared by Laura worked for you as you haven’t gotten back to us with additional questions.
Hence, I will resolve this topic.
kind regards,
Kasia