Skip to content

Commit

Permalink
Merge pull request dlsc-software-consulting-gmbh#347 from effad/staging
Browse files Browse the repository at this point in the history
Update readme.md for 0.5.0
  • Loading branch information
dlemmermann authored Mar 1, 2024
2 parents 3e34c40 + 460b7a4 commit df7cc37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libraries/validatorfx/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ A dependency named `username` is declared here. You can call dependsOn multiple

This defines the check to be executed. Note how the dependency declared above can easily be accessed here (of course we
could also have used `userTextField.getText()` instead of `c.get("username")` here.
Since ValidatorFX-0.5.0 you may also call `withMethod` multiple times thus installing multiple checks to be executed.
All given check methods will be executed (i.e. no short circuit evaluation).

```java
.decorates(userTextField)
Expand All @@ -105,7 +107,9 @@ multiple nodes to be decorated.

The check is declared immediate by this line which means it will be evaluated constantly and `userTextField` will be
decorated as soon as the check condition changes. Without this line you can validate on submit.
You may also want to use explicit validation (i.e. a call to `Validator.validate()`)) at first and then switch to
immediate mode or use `immediateClear()` which will immediately clear validation / decoration when the user gives input.

Here's a screenshot of the example in action:

![Screenshot of MinimalExample](MinimalDemo.png)
![Screenshot of MinimalExample](MinimalDemo.png)

0 comments on commit df7cc37

Please sign in to comment.