文字数チェック追加
This commit is contained in:
@@ -43,18 +43,16 @@ export class StrCountCheckAciton implements IAction{
|
||||
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue) && !('strExpression'in actionNode.ActionValue)) {
|
||||
return result
|
||||
}
|
||||
|
||||
console.log(123);
|
||||
|
||||
this.props = actionNode.ActionValue as IStrCountCheckProps;
|
||||
//条件式の計算結果を取得
|
||||
const record = event.record;
|
||||
const value = record[this.props.field.code].value;
|
||||
let str = value.length
|
||||
record.count.value = str
|
||||
const regex = new RegExp(this.props.strExpression);
|
||||
if(!regex.test(value)){
|
||||
record[this.props.field.code].error > this.props.message.length ;
|
||||
const strCheck = this.props.strExpression;
|
||||
if(value === undefined || value === '' ){
|
||||
return result;
|
||||
}else if(strCheck < value.length){
|
||||
record[this.props.field.code].error = this.props.message;
|
||||
}else{
|
||||
result= {
|
||||
canNext:true,
|
||||
|
||||
Reference in New Issue
Block a user