Class DateValidationRules
java.lang.Object
org.strassburger.tui4j.input.validationrules.DateValidationRules
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationRule<Date>Returns a validation rule that checks if the date is after a specified date.static ValidationRule<Date>Returns a validation rule that checks if the date is after a specified date with a custom string error message.static ValidationRule<Date>after(Date date, StyledText errorMessage) Returns a validation rule that checks if the date is after a specified date with a custom styled error message.static ValidationRule<Date>Returns a validation rule that checks if the date is before a specified date.static ValidationRule<Date>Returns a validation rule that checks if the date is before a specified date with a custom string error message.static ValidationRule<Date>before(Date date, StyledText errorMessage) Returns a validation rule that checks if the date is before a specified date with a custom styled error message.static ValidationRule<Date>Returns a validation rule that checks if the date is in the future.static ValidationRule<Date>futureDate(String errorMessage) Returns a validation rule that checks if the date is in the future with a custom string error message.static ValidationRule<Date>futureDate(StyledText errorMessage) Returns a validation rule that checks if the date is in the future with a custom styled error message.static ValidationRule<Date>pastDate()Returns a validation rule that checks if the date is in the past.static ValidationRule<Date>Returns a validation rule that checks if the date is in the past with a custom string error message.static ValidationRule<Date>pastDate(StyledText errorMessage) Returns a validation rule that checks if the date is in the past with a custom styled error message.
-
Constructor Details
-
DateValidationRules
public DateValidationRules()
-
-
Method Details
-
futureDate
Returns a validation rule that checks if the date is in the future.- Returns:
- A validation rule that checks if the date is in the future.
-
futureDate
Returns a validation rule that checks if the date is in the future with a custom string error message.- Parameters:
errorMessage- The error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is in the future.
-
futureDate
Returns a validation rule that checks if the date is in the future with a custom styled error message.- Parameters:
errorMessage- The styled error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is in the future.
-
pastDate
Returns a validation rule that checks if the date is in the past.- Returns:
- A validation rule that checks if the date is in the past.
-
pastDate
Returns a validation rule that checks if the date is in the past with a custom string error message.- Parameters:
errorMessage- The error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is in the past.
-
pastDate
Returns a validation rule that checks if the date is in the past with a custom styled error message.- Parameters:
errorMessage- The styled error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is in the past.
-
after
Returns a validation rule that checks if the date is after a specified date.- Parameters:
date- The date to compare against.- Returns:
- A validation rule that checks if the date is after the specified date.
-
after
Returns a validation rule that checks if the date is after a specified date with a custom string error message.- Parameters:
date- The date to compare against.errorMessage- The error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is after the specified date.
-
after
Returns a validation rule that checks if the date is after a specified date with a custom styled error message.- Parameters:
date- The date to compare against.errorMessage- The styled error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is after the specified date.
-
before
Returns a validation rule that checks if the date is before a specified date.- Parameters:
date- The date to compare against.- Returns:
- A validation rule that checks if the date is before the specified date.
-
before
Returns a validation rule that checks if the date is before a specified date with a custom string error message.- Parameters:
date- The date to compare against.errorMessage- The error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is before the specified date.
-
before
Returns a validation rule that checks if the date is before a specified date with a custom styled error message.- Parameters:
date- The date to compare against.errorMessage- The styled error message to display if the validation fails.- Returns:
- A validation rule that checks if the date is before the specified date.
-