-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Can't Use Pipe Characters in Variable Regex Validation Rules #1960
Comments
This was a little tricky since we only support strings for validation rules (and I don't want to spend time trying to change that right now). For now, using |
This is still broken even using I am trying to use the following config.
|
What version of the panel are you running @parkervcp? Your code isn't being split at all which makes me think there is some other issue at play. Line 84 of I'm closing this again as well, if it is truly broken (which I don't think it is) it should have a new issue opened. |
so docker-compose restart loaded the old beta 3 docker image and not the latest beta 5 one. I ran into this on 0.7 which is how I go pointed at this. |
Background (please complete the following information):
Describe the bug
Due to a limitation in Laravel's validation system, Pterodactyl is unable to have pipe characters in
regex
andnot_regex
variable validation rules. The issue is that Laravel uses the pipe character to separate each rule when the rules are presented in a string format. When you combine that with a regular expression that also contains the pipe character, Pterodactyl throws an HTTP 500 error.The solution is to use an array format instead. As mentioned in the Laravel documentation...
![image](https://user-images.githubusercontent.com/8495484/79918553-a0bc9e80-83fa-11ea-8488-73bf147ef611.png)
To Reproduce
Steps to reproduce the behavior:
required|regex:/apples|bananas/i
Expected behavior
Persisting the rules without error and being able to validate on regular expressions containing the pipe symbol.
The text was updated successfully, but these errors were encountered: