Package io.keikai.axyra.sheets.content
Class Validation
java.lang.Object
io.keikai.axyra.sheets.content.Validation
A data-validation rule (immutable). Apply with
Range.setValidation(...);
read back with Sheet.validations(). Crosses the boundary as flat JSON.
Types: whole, decimal, list, date,
time, textLength, custom. Operators: between,
notBetween, equal, notEqual, greaterThan,
lessThan, greaterThanOrEqual, lessThanOrEqual.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Validation.Builderbuilder()static ValidationA custom-formula constraint.static ValidationA date constraint (e.g.static ValidationA decimal constraint.How firmly a failure is reported:stop/warning/information.intintfirstRow()The rectangle this rule applies to (0-based, from a read-back rule).formula1()formula2()static ValidationintintlastRow()static ValidationA dropdown list of the given allowed values.operator()booleanWhether a list rule offers its items as an in-cell drop-down.booleanbooleanstatic ValidationtextLength(String operator, String formula1, String formula2) A text-length constraint (e.g.static ValidationA time constraint.A builder pre-loaded with this rule, for read–modify–write round-trips.toJson()type()static ValidationwholeNumber(String operator, String formula1, String formula2) A whole-number constraint (e.g.
-
Method Details
-
list
A dropdown list of the given allowed values. -
wholeNumber
A whole-number constraint (e.g.wholeNumber("between", "1", "10")). -
decimal
A decimal constraint. -
date
A date constraint (e.g.date("between", "2020-01-01", "2020-12-31")). -
time
A time constraint. -
textLength
A text-length constraint (e.g.textLength("lessThanOrEqual", "50", null)). -
custom
A custom-formula constraint. -
builder
-
toBuilder
A builder pre-loaded with this rule, for read–modify–write round-trips. -
toJson
-
fromJson
-
type
-
operator
-
formula1
-
formula2
-
allowBlank
public boolean allowBlank() -
showDropdown
public boolean showDropdown()Whether a list rule offers its items as an in-cell drop-down. -
errorStyle
How firmly a failure is reported:stop/warning/information. -
errorTitle
-
errorMessage
-
showErrorMessage
public boolean showErrorMessage() -
inputTitle
-
inputMessage
-
showInputMessage
public boolean showInputMessage() -
firstRow
public int firstRow()The rectangle this rule applies to (0-based, from a read-back rule). -
firstColumn
public int firstColumn() -
lastRow
public int lastRow() -
lastColumn
public int lastColumn()
-