Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Documentation][Cookbook]Adding validation for image uploads#9194

Merged
pamil merged 3 commits into
Sylius:1.0from
Mipme:patch-2
Feb 28, 2018
Merged

[Documentation][Cookbook]Adding validation for image uploads#9194
pamil merged 3 commits into
Sylius:1.0from
Mipme:patch-2

Conversation

@Mipme
Copy link
Copy Markdown
Contributor

@Mipme Mipme commented Feb 15, 2018

Adding description on how to validate the images that can be uploaded when finishing this guide.

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes none
License MIT

@Zales0123 Zales0123 added the Documentation Documentation related issues and PRs - requests, fixes, proposals. label Feb 15, 2018
minHeight: 200
minWidth: 200

This defines the validation constraints for each image entity. Now connecting the validation of the ShippingMethod to the validation of each single Image Entity is left:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we break this line? it's a bit too long :)

- "image/jpg"
- "image/jpeg"
- "image/gif"
mimeTypesMessage: 'This mime is not allowed. Pls. use PNG, JPG or GIF files.'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls. -> Please
This mime -> This file format

@CoderMaggie
Copy link
Copy Markdown
Member

Can you please rebase your PR with the 1.0 branch as it an enhancement to existing docs? :)

@CoderMaggie CoderMaggie changed the base branch from master to 1.0 February 22, 2018 07:07
Adding description on how to validate the images that can be uploaded when finishing this guide.
Your form so far is working fine, but don't forget about validation.
The easiest way is using validation config files under the ``AppBundle/Resources/config/validation`` folder.

This could look like this f.i.:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f.i. -> e.g.?

minWidth: 200

This defines the validation constraints for each image entity.
Now connecting the validation of the ``ShippingMethod`` to the validation of each single ``Image Entity`` is left:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing the information what file should I modify here.

Copy link
Copy Markdown
Member

@CoderMaggie CoderMaggie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mipme Let's fix @pamil 's suggestions and will be good to go!

@pamil pamil merged commit 2ea9523 into Sylius:1.0 Feb 28, 2018
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Feb 28, 2018

Thanks @Mipme! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation related issues and PRs - requests, fixes, proposals.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants