Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I customize response messages for the user #312

Open
txandre opened this issue May 27, 2024 · 1 comment
Open

How can I customize response messages for the user #312

txandre opened this issue May 27, 2024 · 1 comment

Comments

@txandre
Copy link

txandre commented May 27, 2024

how can I customize response messages for the user

try { $arr = ['title' => 'aa', 'bar' => 'a', 'foo' => 'a']; v::assert($arr['title'], 'string:5', 'example message 1'); v::assert($arr['bar'], 'string:15', 'example message 2'); v::assert($arr['foo'], 'int', 'example message 3'); } catch (AssertionException $e) { echo '<pre>'; print_r($e->getMessage()); }

current answer
The **example message 1** expects to be string in range 5, string 'aa' given.

the current message appears between the default message.

thanks

@dg
Copy link
Member

dg commented Aug 7, 2024

Can you explain it any further, I don't understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants