Validation Rules Table

For a list overview, see Validation Rules.

Validation Rules
class name name group severity examples description
AppBaseDependencies Base dependencies should be added for an application. Missing defaults prError Missing dependency “account” Missing dependency “utils” Missing dependency “validation” Missing dependency “workflow” Base dependencies should be added for an application.
AppCircularDependency No circular dependencies allowed in an application. References warning Circular dependency: first -> second -> first No circular dependencies allowed in an application.
AppComponentNameClash The name of a component is not allowed to be identical to the name of the application. Naming error <Component app> has the same name as its application The name of a component is not allowed to be identical to the name of the application.
ConsistentPackageName Data Element should use one of the existing package names. Naming error <DataElement Beta> is the only element with package name “pkgB” Data Element should use one of the existing package names. Data Element is the only one using this package name.
DataChildHasParentReference Data childs should refer to fields that are link fields to the parent element. References error <DataChild tutorialComp::Order::notPerson> is not a link field to <DataElement Person> Data childs should refer to fields that are link fields to the parent element.
DataChildReference Data childs should refer to existing components, elements, and fields. References error <Component unknownComponent> is missing Data childs should refer to existing components, elements, and fields.
DataElementHasInfoField A data element should have at least one info field. Missing defaults warning <DataElement Invoice> has no isInfoField field A data element should have at least one info field.
DataElementNaming Data elements should start with a capital. Naming prError <DataElement invoice> should be called “Invoice” Data Element names should start with a capital letter. Second letter must be lowercase. Good: “Person”, “P3rson” | Bad: “PErson”
DataOptionDisplayName A displayName property should refer to (a combination of) fields of the data element it is defined in. Naming error <DataOption Person::hasDisplayName> has value “firstName_secondName”, but <Field Person::firstName> is missing <DataOption Person::hasDisplayName> has value “firstName_secondName”, but <Field Person::secondName> is missing A displayName property should refer to (a combination of) fields of the data element it is defined in.
DataOptionHasCountByStatusGraph Data element with option hasCountByStatusGraph must have a status field. References error <Field Invoice::status> is missing Data element with option hasCountByStatusGraph must have a status field.
DataOptionHasCountPerHourGraph Data element with option hasCountPerHourGraph requires a startedAt field and findByStartedAtEq finder. References error <Field Invoice::startedAt> is missing <Finder Invoice::findByStartedAtEq> is missing Data element with option hasCountPerHourGraph requires a startedAt field and findByStartedAtEq finder.
DataOptionHasSearchBar hasSearchBar option of a Data Element should have value [fieldName]:[op] and a finder findBy[FieldName][op]. References error <Operator ux> is not one of #(gt lt eq lk) <Field Customer::firstName> is missing <Finder Customer::findByFirstNameUx> is missing A data element with option hasSearchBar should have a value [fieldName]:[op] with “op” being one of the operators gt,lt,eq,lk (like). They should also have a finder findBy[FieldName][op] specified in the corresponding data element and should be of value type String.
DataOptionUniqueKey A data element with option uniqueKey with value [FieldName] requires a [FieldName] field and findBy[FieldName]Eq finder. References error <Field Invoice::invoiceId> is missing <Finder Invoice::findByInvoiceIdEq> is missing A data element with option uniqueKey with value [FieldName] requires a [FieldName] field and findBy[FieldName]Eq finder in the corresponding data element.
DuplicateNames Elements in the same namespace cannot use the same name. Naming error <Field Invoice::invoiceId> is a duplicate No two elements in the same namespace (dataElements/taskElements/flowElements in a component, fields/finders in a dataElement, …) can share the same name.
EmptyComponent A component should not be empty Missing defaults warning <Component testComp> has no Data Elements A component should not be empty.
FieldDate Fields with names enteredAt or modifiedAt should be Dates. Types warning <Field Item::enteredAt> should be Date type Fields with names enteredAt or modifiedAt should be Dates.
FieldNaming Field names should start with lower case letters. Naming error <Field Person::FirstName> should be called “firstName” Two first two letters of a Field should be lowercase. OK: “anInvoice”, “a”, “a3”, “a2Invoice” | Incorrect: “aPerson”, “Invoice”
FieldToUser Fields with names enteredBy or modifiedBy should be link fields to the class User from net.democritus.usr package. References warning <Field Entry::enteredBy> should be link field to net.democritus.usr::User Fields with names enteredBy or modifiedBy should be link fields to the class User from net.democritus.usr package.
FinderDuplicatePairs Finder should not have duplicate field operator pairs. Duplicates error <Finder Invoice::findByStatusGt> has duplicate operator pair Gt:status Finder should not have duplicate field operator pairs. The check is performed on the operator and field, not the pair’s name.
FinderForVectorOpposite A findBy[Opposite]Eq finder should be defined for “to N” (Ln05, …) relationships. Missing error <Finder Person::findByGroupEq> is missing A findBy[Opposite]Eq finder should be defined for “to N” (Ln05, …) relationships. E.g. for Person { group: DataRef } >– Group { persons: Vector<DataRef> } you need findByGroupEq finder on Person element.
FinderMissingPairs Operator pairs for findBy* finder are missing. Naming prError <Finder Person::findByNameEq> has no operator pairs Operator pairs for findBy* finder are missing.
FinderNaming The operator pairs do not match the finder’s name. Naming error <Finder Person::findByNameEq> should be called findByOtherNameEq The operator pairs of a finder should match its name.
FinderPairReference Field pairs must refer to existing fields. References error Operator pair Person::findByFirstNameEq::Eq:firstName points to nonexistent field All field pairs must refer to existing fields on the associated data element.
FinderPairsNaming The definition of the field operator pair should match its name. Naming warning Eq:name/Eq:otherField The definition of the field operator pair should match its name.
FinderParentForDataChild A findBy[ParentElement]Eq must be defined on the Data Child’s ChildElement. References prError <Finder TargetEl::findByTargetFieldEq> is missing A findBy[ParentElement]Eq must be defined on the Data Child’s ChildElement.
FindersDefaultFinders Standard finders should be added for each data element. Missing defaults prError <Finder Person::findAllPersons> is missing <Finder Person::findByNameEq> is missing Standard finders should be added for each data element.
FlowElementDataElementNaming There is no data element matching the flow element’s name. References error <DataElement Invoice> is missing for <FlowElement Invoice> There is no data element matching the flow element’s name.
FlowNodeNaming State and Task nodes should start with a capital letter. Naming prError <Task completer> should be called Completer State and Task nodes should start with a capital letter.
GeneralNaming No spaces, underscores, or non-ASCII signs are allowed in names. Naming error <Field Person::non|alpha> contains non-alphanumeric characters No spaces, underscores, or non-ASCII signs are allowed in names.
NameNotWantedFinder When the option nameNotWanted is set, no “name” field or findByNameEq finder should be present. Configuration error <Finder Person::findByNameEq> should not exist <Field Person::name> should not exist When the option nameNotWanted is set, no “name” field or findByNameEq finder should be present.
PackageNaming Package name can only contain lowercase words ([a-z]) separated by dots Naming error Package name “2.nsm.test” of <DataElement Invoice> must be a valid Java package name (([a-zA-Z][a-zA-Z0-9_]+.)*[a-zA-Z0-9]+) Package name can only contain lowercase words ([a-z]) separated by dots. The name cannot start or end with a dot, and a dot cannot be followed by another dot.
PrimaryElementsWithFlows Data Elements with flows should be in the Primary category. Classification warning <DataElement Invoice> should be primary Data Elements with flows should be in the Primary category.
ReservedNameEq Name cannot be a reserved name. Naming error <DataElement Id> uses a reserved name Name cannot be a reserved name.
ReverseLinkField A reverse link must be defined for Ln04 and Ln05 link fields. References error Ln05 link <Field Customer::invoices> is missing opposite Ln01 link A reverse link must be defined for Ln04 (Ln02), Ln05 (Ln01), and Ln06 (Ln03) link fields.
SupportedFieldType Fields should only be of tested field types. Unexpected types warning <FieldType NotString> for <Field Person::firstName> is not supported Fields should only be of tested field types.
TaskBrokenFlow A task must have a begin state and an end state. References error <Task InvoiceSender> has no end state A task must have a begin state and an end state.
TaskDefaultOptions In a standard setting (in order to simulate flows in a prototype) each task should have the options “includeDelegation” and “includePerform”. Options information <TaskElement Completer> should have <TaskOption includeDelegation> <TaskElement Completer> should have <TaskOption includePerform> <TaskElement Completer> should have <TaskOption includeRemoteAccess> In a standard setting (in order to simulate flows in a prototype) each task should have the options “includeDelegation” and “includePerform”.
TaskStatusElement Each flow (i.e., primary element with a flow defined on it) should have a corresponding [Element]TaskStatus related to it. References prError <DataElement Invoice> has flow, but is missing <DataElement InvoiceTaskStatus> Each flow (i.e., primary element with a flow defined on it) should have a corresponding [Element]TaskStatus related to it.
UploadUriField A field with name uploadUri should be of type StringFile. Unexpected types warning <Field Person::uploadUri> should be of type StringFile A field with name uploadUri should be of type StringFile.
ValidDataRefTarget Link field must refer to an existing element in an existing component. References error <Field Invoice::stateTask> links to <DataElement NotStateTask> in <Component workflow>, but <Component workflow> is not in application components <Field Invoice::stateTask> links to <DataElement NotStateTask> in <Component workflow>, but <Component workflow> is not in component dependencies <Field Invoice::stateTask> links to a non-existent <DataElement NotStateTask> in <Component workflow> Link field must refer to an existing element in an existing component.