文字数チェック属性名変更
This commit is contained in:
@@ -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= {
|
||||
|
||||
Reference in New Issue
Block a user