我在jQuery DataTables中有两个字段(一个接受整数值,另一个接受String)。我正在使用内联编辑,当两个字段均无效时,则锁定一个字段,用户无法通过双击对其进行编辑。
oValidationOptions:
{
rules: {
value: {
required: true,
maxlength: 2000
}
},
messages: {
value: {
required: "<span style='color:red'>Comments are Required!</span>",
maxlength: "<span style='color:red'>Comments should not Exceed 2000 Characters!</span>"
}
}
}
oValidationOptions:
{
rules: {
value: {
required: true,
min: 0,
max: 1000,
digits: true
}
},
messages: {
value: {
required: "<span style='color:red'>Hold Off is Required!</span>",
min: "<span style='color:red'>The Hold-Off entered must be in range 0 to 1000!</span>",
max: "<span style='color:red'>The Hold-Off entered must be in range 0 to 1000!</span>",
digits: "<span style='color:red'>The Hold-Off entered must be in digits</span>"
}
}
}