를 사용합니다. 이렇게하면 각 필드를 개별적으로 처리 할 필요가 없습니다.
validateedit: function(editor, e, eOpts){
var newModel = e.record.copy(); //copy the old model
newModel.set(e.newValues); //set the values from the editing plugin form
var errors = newModel.validate(); //validate the new data
if(!errors.isValid()){
editor.editor.form.markInvalid(errors); //the double "editor" is correct
return false; //prevent the editing plugin from closing
}
}
Reference
은 당신이
return false
대신
e.cancel = true
사용해야합니다.
e.cancel = true
여전히 열려있는 행 편집기에서 후속 편집 작업도 실패합니다. 그런 다음 취소 버튼을 클릭하고 편집을 다시 시작하려면 행을 다시 편집해야합니다.