diff --git a/plugin/kintone-addins/src/actions/counter-check.ts b/plugin/kintone-addins/src/actions/counter-check.ts index d5ebae1..d107a60 100644 --- a/plugin/kintone-addins/src/actions/counter-check.ts +++ b/plugin/kintone-addins/src/actions/counter-check.ts @@ -6,7 +6,7 @@ import { IAction,IActionResult, IActionNode, IActionProperty, IField} from "../ interface IStrCountCheckProps{ field:IField;//チェックするフィールドの対象 message:string;//エラーメッセージ - strExpression:string;// + maxLength:number;// } /** * 正規表現チェックアクション @@ -21,7 +21,7 @@ export class StrCountCheckAciton implements IAction{ this.props={ field:{code:''}, message:'', - strExpression:'' + maxLength:0 } //アクションを登録する this.register(); @@ -48,10 +48,10 @@ export class StrCountCheckAciton implements IAction{ //条件式の計算結果を取得 const record = event.record; const value = record[this.props.field.code].value; - const strCheck = this.props.strExpression; + const maxLength = this.props.maxLength; if(value === undefined || value === '' ){ return result; - }else if(strCheck < value.length){ + }else if(maxLength < value.length){ record[this.props.field.code].error = this.props.message; }else{ result= {