Class FutureOrPresentValidator<T>
java.lang.Object
io.jmix.flowui.component.validation.AbstractValidator<T>
io.jmix.flowui.component.validation.FutureOrPresentValidator<T>
- All Implemented Interfaces:
Validator<T>
,Consumer<T>
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
@Component("flowui_FutureOrPresentValidator")
@Scope("prototype")
public class FutureOrPresentValidator<T>
extends AbstractValidator<T>
-
Field Summary
Fields inherited from class io.jmix.flowui.component.validation.AbstractValidator
applicationContext, currentAuthentication, datatypeRegistry, defaultMessage, message, messages, substitutor
-
Constructor Summary
ConstructorDescriptionFutureOrPresentValidator
(String message) Constructor for custom error message. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks a value.boolean
void
setCheckSeconds
(boolean checkSeconds) Set true if validator should also check seconds and nanos (if supported) in value.protected void
setTimeSource
(TimeSource timeSource) Methods inherited from class io.jmix.flowui.component.validation.AbstractValidator
afterPropertiesSet, fireValidationException, fireValidationException, formatValue, getMessage, getTemplateErrorMessage, setApplicationContext, setMessage
-
Field Details
-
timeSource
-
checkSeconds
protected boolean checkSeconds
-
-
Constructor Details
-
FutureOrPresentValidator
public FutureOrPresentValidator() -
FutureOrPresentValidator
Constructor for custom error message.- Parameters:
message
- error message
-
-
Method Details
-
setTimeSource
-
setCheckSeconds
public void setCheckSeconds(boolean checkSeconds) Set true if validator should also check seconds and nanos (if supported) in value. Default value is false.- Parameters:
checkSeconds
- check seconds
-
isCheckSeconds
public boolean isCheckSeconds()- Returns:
- true if seconds and nanos are checked
-
accept
Description copied from interface:Validator
Checks a value.- Parameters:
value
- a value- Throws:
ValidationException
-