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

#1574: Name and Description fields, from Edit Image window, have not length or allowed symbols validation #1586

Conversation

jmonteros422
Copy link
Contributor

Need to verify (*)

  • If only alpha-numeric-space is allowed.
  • Recommended character length for name and description.

Description (*)

  • Added native validation to Name(required, length1-120 , alpha-numeric-space) and Description(length0-300, alpha-numeric-space) field

Fixed Issues (if relevant)

  1. Fixes Name and Description fields, from Edit Image window, have not length or allowed symbols validation #1574: Name and Description fields, from Edit Image window, have not length or allowed symbols validation

Manual testing scenarios (*)

  1. Go to Content - Media Gallery
  2. Select an image from Media Gallery and click "three dots" in the bottom right
  3. Select Edit
  4. Enter different symbols into Name and Description fields
    validation
  5. Click Save button

…ve not length or allowed symbols validation - Add native validation to name and description field
@sivaschenko
Copy link
Member

@magento run all tests

Copy link
Member

@sivaschenko sivaschenko left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request @jmonteros422 ! Looks good, please see my single comment.

@@ -5,7 +5,7 @@
*/
-->
<div class="edit-image-details" if="image">
<form id="image-edit-details-form" method="post" enctype="multipart/form-data">
<form data-bind="mageInit:{'validation':{}}" id="image-edit-details-form" method="post" enctype="multipart/form-data">
Copy link
Member

Choose a reason for hiding this comment

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

It would be better to use a shortcut for mage init:

Suggested change
<form data-bind="mageInit:{'validation':{}}" id="image-edit-details-form" method="post" enctype="multipart/form-data">
<form data-mage-init='{"validation":{}}' id="image-edit-details-form" method="post" enctype="multipart/form-data">

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sivaschenko Thank you for reviewing! I tried using the shortcut but this gives me a console error. "Uncaught Error: cannot call methods on validation prior to initialization; attempted to call method 'isValid'".

@sivaschenko
Copy link
Member

@jmonteros422 can you please sign the Adobe CLA (in the checks section under the PR)

…ve not length or allowed symbols validation - Fix static test, remove trailing comma.
…-edit-image-window-have-not-length-or-allowed-symbols-validation
@jmonteros422
Copy link
Contributor Author

@magento run all tests

@jmonteros422 jmonteros422 changed the title [WIP] #1574: Name and Description fields, from Edit Image window, have not length or allowed symbols validation #1574: Name and Description fields, from Edit Image window, have not length or allowed symbols validation Jul 10, 2020
@chalov-anton
Copy link
Contributor

chalov-anton commented Jul 13, 2020

✔️ QA Passed

The allowed characters and length validations are added
symbols

length

@ghost
Copy link

ghost commented Jul 13, 2020

Hi @jmonteros422, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name and Description fields, from Edit Image window, have not length or allowed symbols validation
3 participants