Compare commits

...

2 Commits

Author SHA1 Message Date
cff6ee5478 feat:メールアドレスチェック 2024-05-27 21:49:52 +09:00
wtl
98fcd2eb47 文字数チェック追加 2024-05-27 17:24:03 +09:00
4 changed files with 11 additions and 13 deletions

View File

@@ -12,8 +12,8 @@ API_V1_AUTH_KEY = "X-Cybozu-Authorization"
DEPLOY_MODE = "DEV" #DEV,PROD
#DEPLOY_JS_URL = "https://ka-addin.azurewebsites.net/alc_runtime.js"
DEPLOY_JS_URL = "https://92dc-133-139-109-57.ngrok-free.app/alc_runtime.js"
DEPLOY_JS_URL = "https://ka-addin.azurewebsites.net/alc_runtime.js"
#DEPLOY_JS_URL = "https://92dc-133-139-109-57.ngrok-free.app/alc_runtime.js"
KINTONE_FIELD_TYPE=["GROUP","GROUP_SELECT","CHECK_BOX","SUBTABLE","DROP_DOWN","USER_SELECT","RADIO_BUTTON","RICH_TEXT","LINK","REFERENCE_TABLE","CALC","TIME","NUMBER","ORGANIZATION_SELECT","FILE","DATETIME","DATE","MULTI_SELECT","SINGLE_LINE_TEXT","MULTI_LINE_TEXT"]

View File

@@ -1,2 +1,2 @@
# KAB_BACKEND_URL="https://kab-backend.azurewebsites.net/"
KAB_BACKEND_URL="http://127.0.0.1:8000/"
KAB_BACKEND_URL="https://kab-backend.azurewebsites.net/"
#KAB_BACKEND_URL="http://127.0.0.1:8000/"

View File

@@ -44,17 +44,15 @@ export class StrCountCheckAciton implements IAction{
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,

View File

@@ -55,12 +55,12 @@ export class MailCheckAction implements IAction {
const value = record[this.props.field.code].value;
if (emailAction?.props.modelValue === '厳格') {
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)) {
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 if (emailAction?.props.modelValue === 'ゆるめ') {
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value)) {
if (!/^[^@]+@[^@]+$/.test(value)) {
console.log('ゆるめ');
record[this.props.field.code].error = this.props.message;