You can try the PrimeFaces <p:inputMask /> component. It's really nice:
http://97.107.138.40:8080/prime-showcase/ui/inputMask.jsf

Regards,
Jan-Kees


2009/11/17 Bart Kummel <bkum...@gmail.com>:
> I think the easiest way to get your phone number validation is to use a
> regular expression validator, such as
> <tr:validateRegExp><http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_validateRegExp.html>.
> You can use google search to find a good regular expression to validate
> phone numbers. I found this one
> <http://regexlib.com/REDetails.aspx?regexp_id=458>for example.
>
> Best regards,
> Bart Kummel
>
> On Fri, Nov 13, 2009 at 19:05, laredotornado <laredotorn...@gmail.com>wrote:
>
>>
>> I appreciate the fact that you are responding but you realize the second
>> link
>> is basically an empty page and neither contains examples.
>>
>> I think what you are trying to say is that there are no such tags as the
>> ones I'm searching for and I'll have to write them myself.  - Dave
>>
>>
>>
>> Anton Gavazuk wrote:
>> >
>> > http://wiki.apache.org/myfaces/Extensions/Validator/
>> > http://myfaces.apache.org/commons12/myfaces-validators12/index.html
>> >
>> > 2009/11/13 laredotornado <laredotorn...@gmail.com>
>> >
>> >>
>> >> Could you provide some examples?  I'm looking to create and validate
>> some
>> >> common fields, such as phone number, email address, US state (possibly
>> >> from
>> >> a select menu of all states) and country.  It seems that those types of
>> >> things would have been tackled before and I would not need to re-invent
>> >> the
>> >> wheel.
>> >>
>> >> Thanks, - Dave
>> >>
>> >>
>> >>
>> >> Anton Gavazuk wrote:
>> >> >
>> >> > Myfaces Common RegExp validator will validate everything what you want
>> >> or
>> >> > you can even write your own.
>> >> >
>> >> > 2009/11/13 laredotornado <laredotorn...@gmail.com>
>> >> >
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> I'm using MyFaces 1.1.9.  Is there a pre-built tag somewhere that can
>> >> >> validate a US telephone number field of the form "XXX-XXX-XXXX" where
>> >> "X"
>> >> >> is
>> >> >> a number?  This seems like something that would have been done many
>> >> times
>> >> >> before.
>> >> >>
>> >> >> Thanks, - Dave
>> >> >> --
>> >> >> View this message in context:
>> >> >> http://old.nabble.com/A-telephone-tag--tp26340146p26340146.html
>> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://old.nabble.com/A-telephone-tag--tp26340146p26340389.html
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/A-telephone-tag--tp26340146p26340778.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>

Reply via email to