全半角チェックのバグ修正の為のコード再構築

This commit is contained in:
kanarutsuda
2024-07-17 14:00:18 +09:00
parent 79a8598468
commit fde66aa480
2 changed files with 10 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ export class HalfWidthAction implements IAction{
//条件分岐
//未入力時は何も処理をせず終了
if(value===undefined || value===''){
return result;
record[this.props.field.code].error=null;
}
//全角が含まれていた場合保存処理中止(エラー処理)
if(!this.containsHalfWidthChars(value)){
@@ -55,7 +55,9 @@ export class HalfWidthAction implements IAction{
record[this.props.field.code].error="全角が含まれています";
//次の処理を中止する値設定
result.canNext=false;
return result;
}
else{
record[this.props.field.code].error=null;
}
//半角の場合問題なく実行
//resultプロパティ指定