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

IBX-5255: Move required validation method to helpers #728

Merged
merged 6 commits into from
Mar 14, 2023

Conversation

GrabowskiM
Copy link
Contributor

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-5255
Bug fix? no
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@GrabowskiM GrabowskiM requested a review from dew326 March 9, 2023 09:45
@GrabowskiM GrabowskiM force-pushed the IBX-5255-required-validator-helper branch from 1da42f1 to 513e825 Compare March 9, 2023 09:51
(function (global, doc, ibexa, Translator) {
const formatErrorLine = (errorMessage) => {
const errorIcon = `<svg class="ibexa-icon ibexa-icon--small ibexa-form-error__icon">
<use xlink:href="${window.ibexa.helpers.icon.getIconPath('warning-triangle')}"></use>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<use xlink:href="${window.ibexa.helpers.icon.getIconPath('warning-triangle')}"></use>
<use xlink:href="${ibexa.helpers.icon.getIconPath('warning-triangle')}"></use>


return container;
};
const checkIsEmpty = (field) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont like this func name

ibexa.addConfig('helpers.formError', {
formatLine,
formatLine: (...args) => {
console.warn('helpers.formError.formatLine method is deprecated and will be removed in 5.0');
Copy link
Contributor

Choose a reason for hiding this comment

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

please use ... instead - when deprecating things you should show how to fix it.

@GrabowskiM GrabowskiM force-pushed the IBX-5255-required-validator-helper branch 2 times, most recently from 02ecef9 to 7dac0bb Compare March 10, 2023 12:20
@GrabowskiM GrabowskiM force-pushed the IBX-5255-required-validator-helper branch from d1811e4 to adf77cc Compare March 13, 2023 09:42
@sonarcloud
Copy link

sonarcloud bot commented Mar 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dew326 dew326 merged commit 7c7848d into main Mar 14, 2023
@dew326 dew326 deleted the IBX-5255-required-validator-helper branch March 14, 2023 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants