如何为正则表达式检查添加一行以确保只有字母表中的A字母..在此表单字段中输入A-Z?
<field property="code" depends="required,maxlength">
<msg name="required" key="Code is required." resource="false" />
<msg name="maxlength" key="Code has a max length of {0}" resource="false" />
<arg name="maxlength" key="${var:maxlength}" resource="false" />
<var>
<var-name>maxlength</var-name>
<var-value>1</var-value>
</var>
</field>
</form>
感谢名单
答案 0 :(得分:1)
最简单的答案是[A-Z]+
,假设您的问题是准确的