Level 63
It depends on how you manage the localization in your app.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
in my app I want to add a regex rule to secure strong passwords and also wanto to show its localized (translated) error validation message, I have been searching but can't find a good example similar to my codebase.
My current validation rules
public static $sanctumRegister =
[
'password' => 'regex:/^(?=.*[a-z])(?=.*[A-Z])(=.*\d).+$/'|min:8|required|string',
];
How I validate my requests
$validator = Validator::make($request->all(), AuthValidator::$sanctumRegister);
$this->validateWith($validator);
Thanks in advance!
Please or to participate in this conversation.