-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-4339: Input validation - wrong style #658
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -84,8 +84,9 @@ | |||
const dataContainer = this.fieldContainer.querySelector('.ibexa-field-edit__data'); | |||
const isFileFieldEmpty = fileField.files && !fileField.files.length && dataContainer && !dataContainer.hasAttribute('hidden'); | |||
const { isRequired } = event.target.dataset; | |||
const alreadyIsError = this.fieldContainer.classList.contains(this.classInvalid); |
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.
It would be nice to have more price variable name:
const alreadyIsError = this.fieldContainer.classList.contains(this.classInvalid); | |
const isInvalidatedByOtherValidator = this.fieldContainer.classList.contains(this.classInvalid); |
@@ -113,7 +114,7 @@ | |||
eventName: 'blur', | |||
callback: 'validateAltInput', | |||
invalidStateSelectors: ['.ibexa-data-source__field--alternativeText'], | |||
errorNodeSelectors: [`${SELECTOR_ALT_WRAPPER} .ibexa-data-source__label-wrapper`], |
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.
Question: isn't this BC?
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.
I don't think so, especially as this selector is incorrect, as errors shouldn't be displayed in label block
<use xlink:href="{{ ibexa_icon_path('warning-triangle') }}"></use> | ||
</svg> | ||
{{ error.message }} | ||
</em> |
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.
</em> | |
</em> |
6284d95
to
871df5c
Compare
edd2542
to
b8dc87a
Compare
b8dc87a
to
f936971
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
7f33e54
to
91f4e03
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Regression tests passed on recent changes: |
Checklist:
$ composer fix-cs
)