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

Return error when used validator is not registered #2

Open
ricco24 opened this issue May 1, 2017 · 1 comment
Open

Return error when used validator is not registered #2

ricco24 opened this issue May 1, 2017 · 1 comment
Assignees

Comments

@ricco24
Copy link
Owner

ricco24 commented May 1, 2017

Return suitable error message when used validator is not registered.

new Validation('json', 'status', 'required|enum:0,1,2')

Result:

{
  "error": "Bad input parameter",
  "errors": [
    "Validation for status(0) failed | enum:0,1,2"
  ]
}

Expected result:

{
  "error": "Bad input parameter",
  "errors": [
    "Validator enum not registered"
  ]
}
@ricco24 ricco24 self-assigned this May 18, 2017
@ricco24
Copy link
Owner Author

ricco24 commented May 18, 2017

Maybe bether throw exception?

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

No branches or pull requests

1 participant