提交 960c7133 编写于 作者: Shine-zwj's avatar Shine-zwj

属性值长度校验---临时

上级 cdbe0544
...@@ -336,18 +336,12 @@ import { Environment } from '@/environments/environment'; ...@@ -336,18 +336,12 @@ import { Environment } from '@/environments/environment';
}else{ }else{
return true; return true;
} }
}, message: '${formdetail.getCaption()} 必须填写', trigger: 'change' ,required:true} }, message: '${formdetail.getCaption()} 必须填写', trigger: 'change' ,required:true},
</#if> </#if>
</#if> </#if>
<#if formdetail.getPSAppDEField?? && formdetail.getPSAppDEField()?? && formdetail.getPSAppDEField().getPSDEField?? && formdetail.getPSAppDEField().getPSDEField()?? && formdetail.getPSAppDEField().getPSDEField().getDataType() == 'TEXT' && formdetail.getPSAppDEField().getPSDEField().getLength() gt 0> <#if formdetail.getPSAppDEField?? && formdetail.getPSAppDEField()?? && formdetail.getPSAppDEField().getPSDEField?? && formdetail.getPSAppDEField().getPSDEField()?? && formdetail.getPSAppDEField().getPSDEField().getDataType() == 'TEXT' && formdetail.getPSAppDEField().getPSDEField().getLength() gt 0>
<#assign includeMinValue = formdetail.getPSAppDEField().getPSDEField().getLength()> <#assign includeMinValue = formdetail.getPSAppDEField().getPSDEField().getLength()>
{ validator: (rule:any, value:any, callback:any) => { { validator: (rule:any, value:any, callback:any) => { if(rule.required && value.length > ${includeMinValue} ){return false;}else{return true;}}, message: '${formdetail.getCaption()} 长度不能超过${includeMinValue}', trigger: 'change' ,required:true},
if(rule.required && value.length > ${includeMinValue} ){
return false;
}else{
return true;
}
}, message: '${formdetail.getCaption()} 长度不能超过${includeMinValue}', trigger: 'change' ,required:true}
</#if> </#if>
<#if ctrl.getPSDEFormItemVRs()??> <#if ctrl.getPSDEFormItemVRs()??>
<#list ctrl.getPSDEFormItemVRs() as fideValueRule> <#list ctrl.getPSDEFormItemVRs() as fideValueRule>
......
...@@ -714,6 +714,10 @@ ${gridColumn.getName()} ...@@ -714,6 +714,10 @@ ${gridColumn.getName()}
${edititem.getName()}: [ ${edititem.getName()}: [
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: `<#if langbase??><#noparse>${</#noparse>this.$t('${langbase}.columns.${edititem.getName()?lower_case}')<#noparse>}</#noparse><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse><#else><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse></#if>`, trigger: 'change' }, { required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: `<#if langbase??><#noparse>${</#noparse>this.$t('${langbase}.columns.${edititem.getName()?lower_case}')<#noparse>}</#noparse><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse><#else><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse></#if>`, trigger: 'change' },
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: `<#if langbase??><#noparse>${</#noparse>this.$t('${langbase}.columns.${edititem.getName()?lower_case}')<#noparse>}</#noparse><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse><#else><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse></#if>`, trigger: 'blur' }, { required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: `<#if langbase??><#noparse>${</#noparse>this.$t('${langbase}.columns.${edititem.getName()?lower_case}')<#noparse>}</#noparse><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse><#else><#noparse>${</#noparse>this.$t('app.commonWords.valueNotEmpty')<#noparse>}</#noparse></#if>`, trigger: 'blur' },
<#if edititem.getPSAppDEField?? && edititem.getPSAppDEField()?? && edititem.getPSAppDEField().getPSDEField?? && edititem.getPSAppDEField().getPSDEField()?? && edititem.getPSAppDEField().getPSDEField().getDataType() == 'TEXT' && edititem.getPSAppDEField().getPSDEField().getLength() gt 0>
<#assign includeMinValue = edititem.getPSAppDEField().getPSDEField().getLength()>
{ validator: (rule:any, value:any, callback:any) => { if(rule.required && value.length > ${includeMinValue} ){return false;}else{return true;}}, message: '${edititem.getCaption()} 长度不能超过${includeMinValue}', trigger: 'change' ,required:true},
</#if>
<#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??> <#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#list ctrl.getPSDEGridEditItemVRs() as fideValueRule> <#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#if fideValueRule.getPSDEGridEditItemName() == edititem.getName()> <#if fideValueRule.getPSDEGridEditItemName() == edititem.getName()>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册