The com.vaadin.data.validator.RangeValidator(version 8.0.5) comparator description has the following:
However, the isValid(T value) method starts with: if (value == null) { return true; }
So, the null values can never reach the comparator code. Am I reading that wrong or will null values always pass validation?
Don’t know the official answer, but it seems fair that a null value is always valid, and you’d use the “required” attribute if you needed it to have a value, at which time the value would then need to pass your range validator.
I think the design changed at some point during 8.0 development to allow nulls in validators. Presumably the javadoc needs some updating.