Skip to content

Commit

Permalink
updating taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
ammichael committed Dec 15, 2020
1 parent 085db2d commit 38e0f57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/isValidBirthDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DateManager from 'moment';

const SCREEN_DATE = 'DD/MM/YYYY';

export const isBirthDateValid = (date: string): boolean => {
export const isValidBirthDate = (date: string): boolean => {
const maxAge = 95;
const minAge = 1;
const minDate = DateManager().subtract(maxAge, 'years');
Expand All @@ -11,7 +11,7 @@ export const isBirthDateValid = (date: string): boolean => {
return insertedDate.isBetween(minDate, maxDate);
};

export const isLegalAgeValid = (date: string): boolean => {
export const isValidLegalAge = (date: string): boolean => {
const maxAge = 95;
const minAge = 18;
const minDate = DateManager().subtract(maxAge, 'years');
Expand Down
2 changes: 1 addition & 1 deletion src/isValidCurrency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { currencyToNumber } from '@platformbuilders/helpers';
export const isValidCurrency = (currency: string): boolean =>
!!currency && /^R\$[1-9]\d{0,2}(\.\d{3})*,\d{2}$/.test(currency);

export const isPositiveValue = (value: string): boolean =>
export const isValidPositiveValue = (value: string): boolean =>
!!value && currencyToNumber(value) > 0;

0 comments on commit 38e0f57

Please sign in to comment.