From d4f51f1e2f270043977ac0cfc947d065ad487e49 Mon Sep 17 00:00:00 2001 From: vlewis Date: Tue, 29 Sep 2015 10:25:16 -0700 Subject: [PATCH] KMAIN-1849 Birthdate Correction Error Patron Registration Now Validates The Year From The DOB Field To Make Sure Inaccurate Information Is Rejected Signed-off-by: Nick Duncan modified: Open-ILS/web/js/ui/default/actor/user/register.js --- Open-ILS/web/js/ui/default/actor/user/register.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index a3fa36c78e..c45516899f 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -1596,6 +1596,8 @@ function attachWidgetEvents(fmcls, fmfield, widget) { case 'dob': widget.widget.isValid = function() { + if(!this.attr('value')) return false; + if(this.attr('value').getFullYear().toString().length < 4) return false; return this.attr("value") < new Date(); }; dojo.connect(widget.widget, 'onChange', -- 2.11.0