My fork of jidefx-oss

I spend some time on looking deeper into validation in JavaFx. I found some useful API in ControlsFX, Jide-oss and FXValidation.

I found that on my point of view the best API is in Jide-oss. But Jide-oss library was last updated in February 2014 and was not compatible with jdk1.8.0_20.

Fortunately only a few corrections had to do to fix the problem.
Next I started to look into missing features that I think can be useful.

Here you can find my fork:

First of all I wanted to add posibility to easy customization for decoration of validation. Now you can do this by passing your custom lambda that will create decorator or use one of prepared by me decoration creators defined in ValidationDecorators class (for now graphic and FontAwesome). Also you can easly customize look and feel of validated controls and validators by css.

The next thing that I missed was the ability to easily check status of few validators. It can be useful for define disabled property e.g. button. For that purpose you can use ValidationGroup class.

Use case example:

ValidationGroup validationGroup = new ValidationGroup(emailField, passwordField);

I added also some utils methods e.g. to:

  • get decorators from control
  • show tooltip manualy on validation decorator
  • install required decrator

A brief description of the changes:

  • validation support for datepicker
  • better ability to css customization
  • more freedom of decoration creation (support for lambda expression)
  • ability to create decoration using FontAwesome font.
  • support for observable status of validation group
  • some helper methods

You can check example project witch I modified to show new API features (code changes mostly in ValidationDemo class)

My changes was also merged by Jide-oss into orignal repo - pull request: