addNewEmailCheck
This commit is contained in:
@@ -43,12 +43,15 @@ 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 st = value.length
|
||||
record.count.value = st
|
||||
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 ;
|
||||
@@ -36,15 +36,18 @@ export class MailCheckAction implements IAction {
|
||||
canNext: true,
|
||||
result: false
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
//属性設定を取得する
|
||||
this.actionProps = actionNode.actionProps;
|
||||
|
||||
const emailAction = this.actionProps.find(obj => obj.props.name === 'emailcheck')
|
||||
|
||||
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue) && !!! emailAction) {
|
||||
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue) && !!!emailAction) {
|
||||
return result
|
||||
}
|
||||
console.log(actionNode);
|
||||
|
||||
this.props = actionNode.ActionValue as IMailCheckProps;
|
||||
//条件式の計算結果を取得
|
||||
@@ -52,12 +55,16 @@ export class MailCheckAction implements IAction {
|
||||
const value = record[this.props.field.code].value;
|
||||
|
||||
if (emailAction?.props.modelValue === '厳格') {
|
||||
if (!new RegExp('^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$').test(value)) {
|
||||
if (!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(value)) {
|
||||
console.log('厳格');
|
||||
record[this.props.field.code].error = this.props.message;
|
||||
}
|
||||
} else if (emailAction?.props.modelValue === 'ゆるめ') {
|
||||
if (!new RegExp('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$').test(value)) {
|
||||
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value)) {
|
||||
console.log('ゆるめ');
|
||||
|
||||
record[this.props.field.code].error = this.props.message;
|
||||
|
||||
}
|
||||
} else {
|
||||
result = {
|
||||
@@ -65,6 +72,7 @@ export class MailCheckAction implements IAction {
|
||||
result: true
|
||||
}
|
||||
}
|
||||
console.log(record[this.props.field.code]);
|
||||
return result;
|
||||
} catch (error) {
|
||||
event.error = error;
|
||||
|
||||
@@ -8,7 +8,7 @@ import '../actions/button-add';
|
||||
import '../actions/condition-action';
|
||||
import '../actions/regular-check';
|
||||
import '../actions/mail-check';
|
||||
import '../actions/countercheck';
|
||||
import '../actions/counter-check';
|
||||
import { ActionFlow,IActionFlow, IActionResult,IContext } from "./ActionTypes";
|
||||
|
||||
export class ActionProcess{
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user