Closed marikaris closed 6 years ago
Expected behavior not clearly described
@marikaris Where to put the validation expression?
@dennishendriksen in the validationExpression column in your EMX file, as is documented here: https://molgenis.gitbooks.io/molgenis/content/user_documentation/ref-emx.html
Importing advanced_data_example_v20151104.xlsx results in error:
Conversion failure in entity type [root_hospital_patients] attribute [birthdate]; Failed to convert from type [java.lang.String] to type [java.time.LocalDate] for value '1976-13-03'; nested exception is java.time.format.DateTimeParseException: Text '1976-13-03' could not be parsed: Invalid value for MonthOfYear (valid values 1 - 12): 13
which seems correct since the required date format is yyyy-MM-dd.
Fixing the value in the EMX file results in a successful import.
I will retest it. I cannot recall the issue since I reported it a while ago.
How to Reproduce
Take typetest Put $('birthdate').age().value() == null || ($('birthdate').age().value() >= 0 && $('birthdate').age().value() < 150) in validation expression Try to fill in a date
Expected behavior
Filling in date works fine
Observed behavior
Date is not valid