Whitespace fixups.
This commit is contained in:
@@ -171,44 +171,44 @@ function Validator(urlField, multi_edit,theType){
|
|||||||
dt.className="invalid_value";
|
dt.className="invalid_value";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(theType=="time")
|
else if(theType=="time")
|
||||||
|
{
|
||||||
|
if(!isTime(dt.value))
|
||||||
{
|
{
|
||||||
if(!isTime(dt.value))
|
dt.className="invalid_value";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(theType=="datetime"||theType=="timestamp")
|
||||||
|
{
|
||||||
|
tmstmp=false;
|
||||||
|
if(dt.value=="CURRENT_TIMESTAMP")
|
||||||
|
{
|
||||||
|
dt.className="";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(theType=="timestamp")
|
||||||
|
{
|
||||||
|
tmstmp=true;
|
||||||
|
}
|
||||||
|
if(dt.value=="0000-00-00 00:00:00")
|
||||||
|
return true;
|
||||||
|
var dv=dt.value.indexOf(" ");
|
||||||
|
if(dv==-1)
|
||||||
|
{
|
||||||
|
dt.className="invalid_value";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!(isDate(dt.value.substring(0,dv),tmstmp)&&isTime(dt.value.substring(dv+1))))
|
||||||
{
|
{
|
||||||
dt.className="invalid_value";
|
dt.className="invalid_value";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(theType=="datetime"||theType=="timestamp")
|
}
|
||||||
{
|
|
||||||
tmstmp=false;
|
|
||||||
if(dt.value=="CURRENT_TIMESTAMP")
|
|
||||||
{
|
|
||||||
dt.className="";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(theType=="timestamp")
|
|
||||||
{
|
|
||||||
tmstmp=true;
|
|
||||||
}
|
|
||||||
if(dt.value=="0000-00-00 00:00:00")
|
|
||||||
return true;
|
|
||||||
var dv=dt.value.indexOf(" ");
|
|
||||||
if(dv==-1)
|
|
||||||
{
|
|
||||||
dt.className="invalid_value";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!(isDate(dt.value.substring(0,dv),tmstmp)&&isTime(dt.value.substring(dv+1))))
|
|
||||||
{
|
|
||||||
dt.className="invalid_value";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//validate for integer type
|
//validate for integer type
|
||||||
if(theType.substring(0,3)=="int"){
|
if(theType.substring(0,3)=="int"){
|
||||||
|
Reference in New Issue
Block a user