Skip to content

Commit

Permalink
Merge pull request #485 from ibexa/temp_2.3_to_4.1
Browse files Browse the repository at this point in the history
Merge branch '2.3' of ezsystems/ezplatform-admin-ui into 4.1
  • Loading branch information
dew326 authored Jul 6, 2022
2 parents 2e2cb40 + 4122ace commit a85c5a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
const isFloat = Number.isInteger(value) || value % 1 !== 0;
const isLess = value < parseFloat(event.target.getAttribute('min'));
const isGreater = value > parseFloat(event.target.getAttribute('max'));
const isError = (isEmpty && isRequired) || !isFloat || isLess || isGreater;
const isError = (isEmpty && isRequired) || (!isEmpty && (!isFloat || isLess || isGreater));
const label = event.target.closest(SELECTOR_FIELD).querySelector('.ibexa-field-edit__label').innerHTML;
const result = { isError };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
const isInteger = Number.isInteger(value);
const isLess = value < parseInt(event.target.getAttribute('min'), 10);
const isGreater = value > parseInt(event.target.getAttribute('max'), 10);
const isError = (isEmpty && isRequired) || !isInteger || isLess || isGreater;
const isError = (isEmpty && isRequired) || (!isEmpty && (!isInteger || isLess || isGreater));
const label = event.target.closest(SELECTOR_FIELD).querySelector('.ibexa-field-edit__label').innerHTML;
const result = { isError };

Expand Down

0 comments on commit a85c5a6

Please sign in to comment.