Email Validations for p:inputText

Community Driven Extensions Project
Post Reply
User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

11 May 2012, 22:56

Hi,

I need to use email validations for PF inputText.How can i use email validations for P:inputText Component and i don't want to use JQuery alerts for these validations.




Environment

Primefaces 3.3 & PF Extensions 0.4
WAS7.0
JSF2.0
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

11 May 2012, 23:27

It has nothing to do with extensions. Please ask at the Core forum.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

11 May 2012, 23:52

pe:keyFilter?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

12 May 2012, 12:29

Hi,

Yes,It seems like i can use pe:keyfilter like this.

Code: Select all

             <pe:keyFilter for="mail" mask="email"/> and   email -->   /[a-z0-9_\.\-@]/i	
            

If i want to customize the built-in email format, do i need to use regEx?


Enviroment:

PFExt 0.4
WAS7.0
JSF2.0

Thanks
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

13 May 2012, 10:08

Yes, you need to use regEx.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests