1.在style.xml中定义style

   

<style id="NumberStyle">

<setting>

<param name="option">false</</span>param>             --是否可以为空,不写就默认为false

<param name="pattern">^[0-9]{1,20}$</</span>param>    --匹配规则,此处是数字,1-20位

</setting>

<messages>

  <param name="pattern">validation.branchid.error</</span>param> --抛错信息

</messages>

</style>


2.checkmsg_zh_CN.properties中定义错误信息:

   validation.branchid.error=法人联社号格式不对


3.在交易定义时调用style

 

<field name="BranchId">NumberStyle{option=true}</</span>field>  --true表示可以为空

 

相关文章:

  • 2021-05-18
  • 2021-10-05
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2021-08-25
  • 2021-12-02
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
  • 2021-11-11
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案