나는 검도 - 눈금을 API 데이터로 채우는 작업을하고 있지만 한 필드의 유효성 검사를 추가하면 다른 모든 필드에도 자동으로 작업합니다. 제목 필드하지만 너무 다른 필드를 요구하기 위해 여기검도 - 눈금 열 필드 유효성 검사
schema: {
model: {
id : "id",
fields: {
id: { editable: false, type: 'number'},
name: { editable: true, type : "string" },
unique_url: { editable: true , type: 'string'},
image_url : { editable: true, type : "string" },
title: {type : "string", validation: {
required: true,
validateTitle: function (input) {
console.log("I am inside validation",input.val());
if (input.val().length > 5) {
input.attr("data-validateTitle-msg", "Max length exceeded 5 characters only");
return false;
}
return true;
}
}
},
body: { editable: true, type : "string",validation: { max: 90, required: true, message : "Maximum characters should be 90"} },
adaccount_id: { editable: false, type: 'number'}
}
}
},
내가 추가 한 검증 : 여기
검도 DataSource가 내부 스키마입니다. 유효성 확인 스냅 샷 하나를 추가하려고합니다 ---
제발 내가 그 오류를 찾으려면 내가 찾는 데 도움이됩니다.