Skip to content

Commit

Permalink
refacto validate
Browse files Browse the repository at this point in the history
  • Loading branch information
VachetVirginie committed Aug 1, 2024
1 parent c8a5416 commit 2bed881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/synapse-bridge/src/rules/notAfterToday/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function formatDateToDDMMYYYY(date: Date): string {
export function notAfterTodayFn(errorMessages: ErrorMessages = defaultErrorMessages): ValidationRule {
return (value: Value): ValidationResult => {
if (!value) {
return false;
return true;
}
const formattedValue = typeof value === 'object' ? formatDateToDDMMYYYY(value) : value;
if (isDateAfter(TODAY, formattedValue)) {
Expand Down

0 comments on commit 2bed881

Please sign in to comment.