-
Notifications
You must be signed in to change notification settings - Fork 50
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
materialItem: validate that quantity is greater than 0 #5579
Conversation
06c7f0d
to
d31b8bd
Compare
d31b8bd
to
0d235fe
Compare
@@ -110,6 +110,7 @@ class MaterialItem extends BaseEntity implements BelongsToCampInterface, CopyFro | |||
* The number of items or the amount in the unit of items that are required. | |||
*/ | |||
#[ApiProperty(example: 1.5)] | |||
#[Assert\GreaterThan(0)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there any implications for existing (now invalid) data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, existing values with invalid content cannot be saved anymore until you make a valid value out of it
@@ -512,6 +512,7 @@ | |||
"copied": "{source} kopiert" | |||
}, | |||
"validation": { | |||
"greaterThan": "{_field_} muss grösser sein als {min}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛔ Feature branch deployment currently inactive.If the PR is still open, you can add the |
closes #5077