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

Attribute validation rules #1712

Open
ThorNissen opened this issue Apr 29, 2024 · 2 comments · May be fixed by #1798
Open

Attribute validation rules #1712

ThorNissen opened this issue Apr 29, 2024 · 2 comments · May be fixed by #1798
Labels
1.x bug Something isn't working
Milestone

Comments

@ThorNissen
Copy link
Contributor

ThorNissen commented Apr 29, 2024

  • Lunar version: ^1.0.0-alpha
  • Laravel Version: ^11.0
  • PHP Version: ^8.2
  • Database Driver & Version: Using Laravel Sail image mysql/mysql-server:8.0

Expected Behaviour:

In 0.8 it was possible to add a validation rule to an attribute.
The same should be possbile in 1.0.0-alpha

Actual Behaviour:

Right now it doesn't use the rule when using the attribute.

Steps To Reproduce:

  • A fresh Lunar 1.0.0-alpha installation.
  • Create an attribute group eg. "SEO".
  • Create an attribute on the group eg. "Meta description" with the rule max:50
  • Use the attribute on a product and save the product. (Should validate using max:50 but it doesn't)

Example of 1.0.0-alpha rule setup

1 0-rules

Example of 0.8 rule setup

0 8-rules

Example of 0.8 validation

0 8-validation

@ThorNissen ThorNissen added bug Something isn't working unconfirmed labels Apr 29, 2024
@glennjacobs glennjacobs added this to the v1.0 milestone Apr 29, 2024
@glennjacobs glennjacobs added the 1.x label May 20, 2024 — with Linear
@wychoong wychoong linked a pull request May 31, 2024 that will close this issue
@wychoong
Copy link
Contributor

@ThorNissen does this #1798 fix for you?

@ThorNissen
Copy link
Contributor Author

@ThorNissen does this #1798 fix for you?

I'm currently not able to give it a test.
But looking at the PR it seems to do the job 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants