⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (623 Bytes)
RE: How to debug streamed JavaScript?
» MatchValidator.js
JavaScript file -
Plug Gulp
, 04/09/2013 01:53 PM
WT_DECLARE_WT_MEMBER
(
1
,
JavaScriptConstructor
,
"
MatchValidator
"
,
function
(
elem
,
mandatory
,
blankError
,
invalidDataError
,
mismatchError
)
{
this
.
validate
=
function
(
text
)
{
var
v
;
if
((
typeof
(
elem
)
===
"
undefined
"
)
||
(
elem
===
null
))
{
return
{
valid
:
false
,
message
:
invalidDataError
};
}
if
(
elem
.
options
)
{
v
=
elem
.
options
.
item
(
elem
.
selectedIndex
).
text
;
}
else
{
v
=
edit
.
value
;
};
if
(
text
!=
v
)
{
return
{
valid
:
false
,
message
:
mismatchError
};
}
if
((
text
.
length
==
0
)
&&
(
mandatory
))
{
return
{
valid
:
false
,
message
:
blankError
};
}
else
{
return
{
valid
:
true
};
}
}
}
);
« Previous
1
2
3
4
5
Next »
(4-4/5)
Loading...