modify translations 🤦

This commit is contained in:
2023-11-28 17:31:52 +05:00
parent 45b42d47e8
commit af9afd5113
28 changed files with 3240 additions and 956 deletions

21
app/Rules/OnlyLetters.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace App\Rules;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
class OnlyLetters implements ValidationRule
{
/**
* Run the validation rule.
*
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
{
if (! preg_match('/^([a-zA-Zа-яZžŽäÄňŇöÖşŞüÜçÇýÝ])+$/', $value)) {
$fail('The :attribute field must only contain letters.');
}
}
}