JDK-8097825 : Feature suggestion : input masks
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2014-09-11
  • Updated: 2015-06-12
  • Resolved: 2014-09-11
Related Reports
Duplicate :  
Description
JavaFX currently misses an elementary feature : input validation / restriction.
I think most people would like to have an easy-to-use input mask on TextInputControl-fields, sensible options could be : 

ALPHANUMERIC restriction
ALPHA restriction
NUMERIC restriction
FLOAT restriction which would also allow at most one decimal separator - this would have to be read from the current locale, of course because the decimal seperator is different in some countries as you might know - being able to explicitly choose it from a list would also be nice because some developers create applications for foreign languages ...

input-masks of some sort with mask-symbols for the most common types of input (see above) - sometimes the developer has to provide limited fields in which both the position and the specific type of input is restricted

length limits (min and max)

all of these should be configurable in scenebuilder - which is pretty easy to implement as there is already the possibility to add choiceboxes and textfields to scenebuilder itself via custom properties on TextField-extending, custom fields, included as library in SB

These are pretty basic functionalities, most frameworks other than JavaFX already implement it in some way ... please think about it, pass the idea to your team of TextInputControl-experts sometime - the community will most assuredly appreciate it
Comments
Duplicate of RT-37785, which includes MaskFormatter as one of the formatters.
11-09-2014