1 回答

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超10個(gè)贊
如果后臺(tái)可以的話也許你可以這樣做。并且不要將生日字段添加到表單中
let inputCheck = this.validateBeforeSubmit(newUser);
if(inputCheck) {
let fd = new FormData();
fd.append("name", newUser.name);
fd.append("surname", newUser.surname);
fd.append("email", newUser.email);
fd.append("title", newUser.title)
fd.append("employee_number", newUser.employee_number)
if(newUser.birthday && newUser.birthday.length > 0){
fd.append("birthday", newUser.birthday)
}
......
添加回答
舉報(bào)