Skip to content

How can I customize response messages for the user #312

Open
@andretx33

Description

@andretx33

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions