pe:keyFilter regEx problem....

Community Driven Extensions Project
Post Reply
omnivox
Posts: 1
Joined: 29 Aug 2016, 17:18

29 Aug 2016, 17:26

Hi folks... I have some trouble with this component because I'm trying to specify a regular expression for filtering my number inputs.
So I have a number with the mask: dddd.dddddd (d = digit, . = single dot).
So my number can have 1 to 4 digits before dot (.) and 1 to 6 digits after the dot...
I'm trying this regex: ^([0-9]{1,4})(\.)([0-9]{1,6})$ (valid on http://www.pagecolumn.com/tool/regtest.htm), but this doesn't work at all...

Sorry if I'm flooding topic.. I'm new...
Sorry about my english too...

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

03 Sep 2016, 13:20

use p:mask.
keyfilter is a component to filter a single character. Specifying a mask with it won't work.
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

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests