//只能从小到大的输入
function validateVal(obj) {
var schedule = $('#id').find('input').val();
//匹配正则
var regex = /^[1-7]{1,7}$/;
if (!regex.test(schedule)) {
obj.message = "请输入正确的数据";
return false;
}
var length = schedule.length;
if(length > 1 ){
for(var i=0; i<length ; i++){
var value = schedule.substring(i,i+1);
var valueNew = schedule.substring(i+1,i+2);
if (parseInt(value) >= parseInt(valueNew)) {
obj.message = "请输入正确的数据";
return false;
}
}
}
return true;
}