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

Implement new Laravel 8 validation rules #733

Open
kevinnewesil opened this issue Sep 4, 2021 · 1 comment
Open

Implement new Laravel 8 validation rules #733

kevinnewesil opened this issue Sep 4, 2021 · 1 comment

Comments

@kevinnewesil
Copy link
Contributor

Subject of the issue

Support for laravel 8:

  • Validation rules in RuleListTrait should match laravel 8.x validation rules

Your environment

  • version of this package: newest
  • version of Laravel: 8.x or higher

Steps to reproduce

Use any of the none pre-defined available validation rules; EG: "Present". It will consider these rules as "server rules" and make them laravelValidationRemote properties. which causes unnecessary requests for issues that do not require server-side validation.

List of rules that are not added in Support/RuleListTrait.php

  • AcceptedIf
  • CurrentPassword (should most likely be serverRule)
  • DateEquals
  • EndsWith
  • Exclude
  • ExcludeIf
  • ExcludeUnless
  • GreaterThan
  • GreaterThanOrEqual
  • LessThan
  • LessThanOrEqual
  • MultipleOf
  • NotRegex
  • Present
  • Prohibited
  • ProhibitedIf
  • ProhibitedUnless
  • Prohibits
  • StartsWith
  • UUID

Expected behaviour

Validation rules are properly parsed as clientRules or serverRules when they're laravel default rules that don't require server side logic.

Actual behaviour

All laravel validation rules that are newly added in laravel 8.x will be parsed as serverRules and create overhead in Ajax requests.

@stale
Copy link

stale bot commented Sep 9, 2021

This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automatically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for contributing :)

@stale stale bot added the stale label Sep 9, 2021
@bytestream bytestream changed the title Laravel 8.x support Implement new Laravel 8 validation rules Feb 10, 2022
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

2 participants