Skip to content

Commit

Permalink
avniproject/avni-client#1365 | Fix Warning in test for missing date f…
Browse files Browse the repository at this point in the history
…ormat during validation
  • Loading branch information
himeshr committed May 1, 2024
1 parent b607e8f commit 7e8a8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/application/FormElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class FormElement extends BaseEntity {
((!this.mandatory && !_.isNil(value)) || (this.mandatory))) {
failure.messageKey = "invalidTimeFormat";

} else if (this.concept.datatype === Concept.dataType.Date && !moment(value).isValid() &&
} else if (this.concept.datatype === Concept.dataType.Date && !moment(value, 'YYYY-MM-DD').isValid() &&
((!this.mandatory && !_.isNil(value)) || (this.mandatory))) {
failure.messageKey = "invalidDateFormat";
} else if (
Expand Down

0 comments on commit 7e8a8e5

Please sign in to comment.