Skip to content

Commit

Permalink
fix: alert validation sync
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonski committed Jul 21, 2023
1 parent c048641 commit cdf6576
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export const userValidation = async (body) => {
}
//2. degree와 role 유효성 검사
if (body.degree) {
if (["학사", "석사", "박사", "admin"].indexOf(body.degree) < 0) {
alert("학위는 학사, 석사, 박사, admin 중 하나가 되어야 합니다.");
if (["Bachelor", "Master", "Doctor", "Admin"].indexOf(body.degree) < 0) {
alert("학위는 Bachelor, Master, Doctor, Admin 중 하나가 되어야 합니다.");
return false;
}
}
if (body.role) {
if (["client", "admin"].indexOf(body.role) < 0) {
alert("역할은 client, admin 중 하나가 되어야 합니다.");
if (["Client", "Admin"].indexOf(body.role) < 0) {
alert("역할은 Client, Admin 중 하나가 되어야 합니다.");
return true;
}
}
Expand Down

0 comments on commit cdf6576

Please sign in to comment.