mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#18577368 필수 필드가 아닌 경우에는 값을 체크하지 않도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7084 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9ffc20d6cf
commit
bd1fa7ed8f
1 changed files with 3 additions and 2 deletions
|
|
@ -92,12 +92,13 @@ var Validator = xe.createApp('Validator', {
|
|||
|
||||
if (!_el) return true;
|
||||
|
||||
var el = $(_el), val = get_value(el);
|
||||
var el = $(_el), val = $.trim(get_value(el));
|
||||
var minlen = parseInt(this.minlen) || 0;
|
||||
var maxlen = parseInt(this.maxlen) || 0;
|
||||
var rule = (this.rule || '').split(',');
|
||||
|
||||
if (this.required && !val) (result = (!!self.cast('ALERT', [form, name, 'isnull']) && false));
|
||||
if (this.required && !val) return (result = (!!self.cast('ALERT', [form, name, 'isnull']) && false));
|
||||
if (!this.required && !val) return (result = true);
|
||||
if ((minlen && maxlen) && (val.length < minlen || val.length > maxlen)) return (result = (!!self.cast('ALERT', [form, name, 'outofrange', minlen, maxlen]) && false));
|
||||
|
||||
if (this.equalto) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue