开发者

Regex in validation.xml

how would I add a line for a regex check to make sure only A letter of the alphabet.. A-Z is entered in this form field?

<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 na开发者_如何学Cme="maxlength" key="${var:maxlength}" resource="false" />
        <var>
           <var-name>maxlength</var-name>
           <var-value>1</var-value>
        </var>
     </field>
  </form>

thanx


The simplest answer is [A-Z]+ assuming your question is accurate

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜