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

Failed to validate exitance of validation type. #10

Open
johnnymast opened this issue Mar 30, 2023 · 0 comments
Open

Failed to validate exitance of validation type. #10

johnnymast opened this issue Mar 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@johnnymast
Copy link
Owner

Describe the bug

I used this code knowing well it would not work because we don't support arguments yet but the validator validations on the rules did not catch the unknown type of 'required'.

Here is a screenshot of the causing code:

image

The exception triggered is here.

https://github.com/johnnymast/redbox-validation/blob/65f941782eccd967121d865d5fc74dd2bd2b497c/src/Validator.php#L192-L198

To Reproduce
Add a nonexisting validation type in validate type and watch the horror.

Expected behavior
A clear and concise description of what you expected to happen.

Software

  • PHP 8.1
  • Slim 4
  • Nginx
@johnnymast johnnymast added the bug Something isn't working label Mar 30, 2023
johnnymast added a commit that referenced this issue Mar 30, 2023
…olution is janky and mist need an other pass. Also a additional unit test needs to be created that this bug will not come back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant