Skip to content

Commit

Permalink
UICIRC-514 - updated validator name
Browse files Browse the repository at this point in the history
  • Loading branch information
maximdidenkoepam committed Nov 5, 2020
1 parent 638d6ed commit 1d0f581
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change history for ui-circulation

## 5.0.0 (IN PROGRESS)

* Keyword all - allowed by backend. Refs UICIRC-506.
* Unable to enter decimal places on Overdue Fines Policy on Honeysuckle and Snapshot Dev. Refs UICIRC-514.

## 4.0.0 (https://github.com/folio-org/ui-circulation/tree/v4.0.0) (2020-10-13)
[Full Changelog](https://github.com/folio-org/ui-circulation/compare/v3.0.0...v4.0.0)

Expand Down
2 changes: 1 addition & 1 deletion src/settings/Validation/engine/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const isIntegerGreaterThanZero = (value) => isInteger(value) && value > 0

export const isIntegerGreaterThanOrEqualToZero = (value) => isInteger(value) && value >= 0;

export const isPositiveFloatGreaterThanZero = (value) => {
export const isFloatGreaterThanZero = (value) => {
const parsedValue = parseFloat(value, 10);

return isNumber(parsedValue) && parsedValue > 0;
Expand Down
8 changes: 4 additions & 4 deletions src/settings/Validation/engine/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
isSelected,
isGreaterOrEqualThanPassedField,
isFloatGreaterThanOrEqualToZero,
isPositiveFloatGreaterThanZero,
isFloatGreaterThanZero,
isMaximumFineValueValid,
hasNoChargeLostItemProcessingFee,
hasLostItemProcessingFeeValue,
Expand Down Expand Up @@ -84,11 +84,11 @@ export default {
message: <FormattedMessage id="ui-circulation.settings.finePolicy.validate.maximumRecallOverdueFine" />,
},
hasOverdueFineInterval: {
validate: isPositiveFloatGreaterThanZero,
validate: isFloatGreaterThanZero,
message: <FormattedMessage id="ui-circulation.settings.finePolicy.validate.hasOverdueFineInterval" />
},
hasOverdueRecallFineInterval: {
validate: isPositiveFloatGreaterThanZero,
validate: isFloatGreaterThanZero,
message: <FormattedMessage id="ui-circulation.settings.finePolicy.validate.hasOverdueRecallFineInterval" />
},
isMaximumOverdueFineValid: {
Expand All @@ -104,7 +104,7 @@ export default {
message: <FormattedMessage id="ui-circulation.settings.lostItemFee.validate.hasPatronBilledAfterAgedToLostValue" />
},
hasPositiveLostItemProcessingFeeValue: {
validate: isPositiveFloatGreaterThanZero,
validate: isFloatGreaterThanZero,
message: <FormattedMessage id="ui-circulation.settings.lostItemFee.validate.hasPositiveLostItemProcessingFeeValue" />
},
hasNoChargeLostItemProcessingFee: {
Expand Down

0 comments on commit 1d0f581

Please sign in to comment.