Commit e25fc1f2 by Yvon Kerdoncuff

quick fix to prevent dates whose 4 letters year starts with 0 to be considered…

quick fix to prevent dates whose 4 letters year starts with 0 to be considered valid on new member inscription
parent ad7bc617
Pipeline #3895 canceled with stage
...@@ -279,6 +279,10 @@ function save_current_coop(callback) { ...@@ -279,6 +279,10 @@ function save_current_coop(callback) {
if ((date_test.getDate() !== parseInt(jj)) || ((date_test.getMonth()+1) !== parseInt(mm)) || (date_test.getFullYear() !== parseInt(aaaa)) || !date_test.isValid()) { if ((date_test.getDate() !== parseInt(jj)) || ((date_test.getMonth()+1) !== parseInt(mm)) || (date_test.getFullYear() !== parseInt(aaaa)) || !date_test.isValid()) {
birthdate_error = true; birthdate_error = true;
} }
// do not allow years starting with a 0 as it causes bugs later in odoo
if (aaaa < 1000) {
birthdate_error = true;
}
} catch (Exception) { } catch (Exception) {
birthdate_error = true; birthdate_error = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment