mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
Fixed a bug for processing conditional validation.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9310 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
86777cf4f7
commit
ac86609035
1 changed files with 2 additions and 2 deletions
|
|
@ -145,9 +145,9 @@ var Validator = xe.createApp('Validator', {
|
||||||
|
|
||||||
if(f['if']) {
|
if(f['if']) {
|
||||||
if(!$.isArray(f['if'])) f['if'] = [f['if']];
|
if(!$.isArray(f['if'])) f['if'] = [f['if']];
|
||||||
for(i in f['if']) {
|
for(i=0;i<f['if'].length;i++) {
|
||||||
if_ = f['if'][i];
|
if_ = f['if'][i];
|
||||||
fn = new Function('el', 'return !!(' + (if_.test.replace(/$(\w+)/g, 'el["$1"]')) +')');
|
fn = new Function('el', 'return !!(' + (if_.test.replace(/\$(\w+)/g, 'el["$1"].value')) +')');
|
||||||
if(fn(elems)) f[if_.attr] = if_.value;
|
if(fn(elems)) f[if_.attr] = if_.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue