Class DoubleMinValidator<T>
java.lang.Object
io.jmix.flowui.component.validation.AbstractValidator<T>
io.jmix.flowui.component.validation.DoubleMinValidator<T>
- All Implemented Interfaces:
Validator<T>
,Consumer<T>
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
@Component("flowui_DoubleMinValidator")
@Scope("prototype")
public class DoubleMinValidator<T>
extends AbstractValidator<T>
implements org.springframework.beans.factory.InitializingBean
-
Field Summary
Fields inherited from class io.jmix.flowui.component.validation.AbstractValidator
applicationContext, currentAuthentication, datatypeRegistry, defaultMessage, message, messages, substitutor
-
Constructor Summary
ConstructorDescriptionDoubleMinValidator
(Double min) Constructor with default error message.DoubleMinValidator
(Double min, String message) Constructor with custom error message. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks a value.protected void
fireValidationException
(T value) getMin()
boolean
void
setInclusive
(boolean inclusive) Set to true if the value must be greater than or equal to the specified minimum.void
Sets min value.void
Sets min value and inclusive option.Methods inherited from class io.jmix.flowui.component.validation.AbstractValidator
afterPropertiesSet, fireValidationException, fireValidationException, formatValue, getMessage, getTemplateErrorMessage, setApplicationContext, setMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
-
Field Details
-
min
-
inclusive
protected boolean inclusive
-
-
Constructor Details
-
DoubleMinValidator
public DoubleMinValidator() -
DoubleMinValidator
Constructor with default error message.- Parameters:
min
- min value
-
DoubleMinValidator
Constructor with custom error message. This message can contain '${value}', and '${min}' keys for formatted output.Example: "Value '${value}' should be greater than or equal to '${min}'".
- Parameters:
min
- min valuemessage
- error message
-
-
Method Details
-
setMin
Sets min value.- Parameters:
min
- min value
-
getMin
- Returns:
- min value
-
setMin
Sets min value and inclusive option.- Parameters:
min
- min valueinclusive
- inclusive option
-
setInclusive
public void setInclusive(boolean inclusive) Set to true if the value must be greater than or equal to the specified minimum. Default value is true.- Parameters:
inclusive
- inclusive option
-
isInclusive
public boolean isInclusive()- Returns:
- true if the value must be greater than or equal to the specified minimum
-
accept
Description copied from interface:Validator
Checks a value. -
fireValidationException
-