From d0b1a8ec06c13891c7815de237aaae59ab68755c Mon Sep 17 00:00:00 2001 From: AlasdairSwan Date: Wed, 5 Nov 2014 15:40:38 -0500 Subject: [PATCH] Fixed bug with validation templates expecting number but being passed string. --- common/static/js/spec_helpers/edx.utils.validate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/static/js/spec_helpers/edx.utils.validate.js b/common/static/js/spec_helpers/edx.utils.validate.js index 5215337f0c..f478219004 100644 --- a/common/static/js/spec_helpers/edx.utils.validate.js +++ b/common/static/js/spec_helpers/edx.utils.validate.js @@ -131,9 +131,9 @@ var edx = edx || {}; }; if ( key === 'min' ) { - obj.context.count = $el.attr('minlength'); + obj.context.count = parseInt( $el.attr('minlength'), 10 ); } else if ( key === 'max' ) { - obj.context.count = $el.attr('maxlength'); + obj.context.count = parseInt( $el.attr('maxlength'), 10 ); } }