Forum Stats

  • 3,784,366 Users
  • 2,254,929 Discussions


RegExpression Not Working in <af:validateRegExp>

User_EP58N Member Posts: 6 Blue Ribbon
edited Dec 1, 2021 12:03PM in JDeveloper and ADF


I am using Jdeveloper and my requirement is to have only numbers and characters in one input text attribute of .jsff page with no spaces and no special characters for which i have used the below pattern

 <af:column sortProperty="#{}"

           filterable="true" sortable="true"

             headerText="Vehicle Registration No" id="c3">

        <af:inputText value="#{row.bindings.VehicleRegNo1.inputValue}" autoSubmit="true"







         <f:validator binding="#{row.bindings.VehicleRegNo1.validator}"/>

         <af:validateRegExp pattern="^[A-Za-z0-9]$" messageDetailNoMatch="Registration Number must have only Numbers and characters"/>



Can someone help me with the correct pattern.


Best Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,807 Red Diamond
    Accepted Answer

    It would help if you could tell us what the problem is you see with your regular expression.

    From what I see your expression only allows one character or number. To allow multiple characters and numbers use


    the '*' means that the token before the '*' matches zero to unlimited times.


  • dvohra21
    dvohra21 Member Posts: 14,328 Gold Crown
    Accepted Answer

    Use reg expr ^[A-Za-z0-9]*$