Skip to content
Snippets Groups Projects
Commit efe25aec authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

added validation for date of birth

parent a291bfb8
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<outputFormat>dd.MM.yyyy</outputFormat>
<onValidation>%aditoprj%/entity/Person_entity/entityfields/dateofbirth/onValidation.js</onValidation>
</entityField>
<entityField>
<name>FIRSTNAME</name>
......
import("system.datetime");
import("system.translate");
import("system.vars");
import("system.result");
import("Entity_lib");
var dob = ProcessHandlingUtils.getOnValidationValue();
if (Number(datetime.clearTime(dob)) > Number(vars.get("$sys.today")))
result.string(translate.text("date of birth must not be in the future"));
\ No newline at end of file
......@@ -2625,6 +2625,9 @@
<entry>
<key>Management</key>
</entry>
<entry>
<key>date of birth must not be in the future</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
<sqlModels>
......
......@@ -114,6 +114,10 @@
<key>${QUANTITY_LOWER_THAN_1}</key>
<value>Die Menge muss mindestens 1 sein.</value>
</entry>
<entry>
<key>date of birth must not be in the future</key>
<value>Geburtsdatum darf nicht in der Zukunft liegen</value>
</entry>
<entry>
<key>Days inactive</key>
<value>Tage inaktiv</value>
......
......@@ -2650,6 +2650,9 @@
<entry>
<key>Réunion</key>
</entry>
<entry>
<key>date of birth must not be in the future</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment