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

When using the When-rule the error message is '1' when no else is provided #739

Closed
jonsa opened this issue Oct 11, 2016 · 2 comments
Closed
Labels

Comments

@jonsa
Copy link

jonsa commented Oct 11, 2016

$v = new \Respect\Validation\Rules\When(
    new \Respect\Validation\Rules\AlwaysInvalid,
    new \Respect\Validation\Rules\AlwaysValid
);

try {
    $v->assert('foo');
} catch (\Respect\Validation\Exceptions\ValidationException $e) {
    echo $e->getMainMessage();
}

prints 1

@danimalweb
Copy link

I have the same issue. Did you find a solution?

@henriquemoody
Copy link
Member

Fixed on 1.0.20 and 1.1.15.

Thanks for reporting! 🐼

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

No branches or pull requests

3 participants