Disallow special characters as εωργία or ĄČĘĖĮ in fields [RESOLVED]

Please help me limit non latin letter used in text as name or address fields.
I read these posts but not understand where i must to put this code and as example if i want to limit ČĘĖĮŠŲŪ and few other languages letter used with warning message how it must look like.
Please xplain one more time

In all cases maybe it is better not not alow, but just alow what i can use and thats it?
As example alow to use only leters ABCDEFGHIJKLMNOPRSTUQXVWZ and thats it becasue there are many other languages with other symbols.
But in formula just alow letters from alow list

I ended up with this solution

add_filter( 'gform_field_validation', function( $result, $value, $form, $field ) {
	$pattern = "/^[a-zA-Z0-9 -,.]*$/"; // note the space before the closing brace
	if ( strpos( $field->cssClass, 'letters_spaces' ) !== false && ! preg_match( $pattern, $value ) ) {
		$result['is_valid'] = false;
		$result['message'] = 'Error: Please use only Latin letters, numbers, space or -';
	return $result;
}, 10, 4 );

and added it with plugin
Code Snippets
Why plugin, because when updating theme functions.php file is rewriting all time so with this plugin will be no issue.