pub enum ValidationError {
Show 75 variants
MissingRequiredAttribute {
attribute: String,
},
InvalidAttributeType {
attribute: String,
expected: String,
actual: String,
},
ExpectedMultiValue {
attribute: String,
},
ExpectedSingleValue {
attribute: String,
},
UniquenesViolation {
attribute: String,
},
InvalidCanonicalValue {
attribute: String,
value: String,
allowed: Vec<String>,
},
MissingSubAttribute {
attribute: String,
sub_attribute: String,
},
UnknownAttribute {
attribute: String,
schema_id: String,
},
Custom {
message: String,
},
MissingSchemas,
EmptySchemas,
InvalidSchemaUri {
uri: String,
},
UnknownSchemaUri {
uri: String,
},
DuplicateSchemaUri {
uri: String,
},
MissingBaseSchema,
ExtensionWithoutBase,
MissingRequiredExtension,
MissingId,
EmptyId,
InvalidIdFormat {
id: String,
},
ClientProvidedId,
InvalidExternalId,
InvalidMetaStructure,
MissingResourceType,
InvalidResourceType {
resource_type: String,
},
ClientProvidedMeta,
InvalidCreatedDateTime,
InvalidModifiedDateTime,
InvalidLocationUri,
InvalidVersionFormat,
InvalidDataType {
attribute: String,
expected: String,
actual: String,
},
InvalidStringFormat {
attribute: String,
details: String,
},
InvalidBooleanValue {
attribute: String,
value: String,
},
InvalidDecimalFormat {
attribute: String,
value: String,
},
InvalidIntegerValue {
attribute: String,
value: String,
},
InvalidDateTimeFormat {
attribute: String,
value: String,
},
InvalidBinaryData {
attribute: String,
details: String,
},
InvalidReferenceUri {
attribute: String,
uri: String,
},
InvalidReferenceType {
attribute: String,
ref_type: String,
},
BrokenReference {
attribute: String,
reference: String,
},
SingleValueForMultiValued {
attribute: String,
},
ArrayForSingleValued {
attribute: String,
},
MultiplePrimaryValues {
attribute: String,
},
InvalidMultiValuedStructure {
attribute: String,
details: String,
},
MissingRequiredSubAttribute {
attribute: String,
sub_attribute: String,
},
MissingRequiredSubAttributes {
attribute: String,
missing: Vec<String>,
},
InvalidSubAttributeType {
attribute: String,
sub_attribute: String,
expected: String,
actual: String,
},
UnknownSubAttribute {
attribute: String,
sub_attribute: String,
},
NestedComplexAttributes {
attribute: String,
},
MalformedComplexStructure {
attribute: String,
details: String,
},
CaseSensitivityViolation {
attribute: String,
details: String,
},
ReadOnlyMutabilityViolation {
attribute: String,
},
ImmutableMutabilityViolation {
attribute: String,
},
WriteOnlyAttributeReturned {
attribute: String,
},
ServerUniquenessViolation {
attribute: String,
value: String,
},
GlobalUniquenessViolation {
attribute: String,
value: String,
},
InvalidCanonicalValueChoice {
attribute: String,
value: String,
allowed: Vec<String>,
},
UnknownAttributeForSchema {
attribute: String,
schema: String,
},
RequiredCharacteristicViolation {
attribute: String,
characteristic: String,
},
UnsupportedAttributeType {
attribute: String,
type_name: String,
},
InvalidAttributeName {
actual: String,
expected: String,
},
RequiredAttributeMissing(String),
NullValueForOptionalAttribute(String),
ExpectedArray(String),
InvalidPrimaryIndex {
attribute: String,
index: usize,
length: usize,
},
NotMultiValued(String),
ReservedUsername(String),
UsernameTooShort(String),
UsernameTooLong(String),
InvalidUsernameFormat(String),
InvalidEmailDomain {
email: String,
allowed_domains: Vec<String>,
},
WorkEmailRequired,
ExternalIdRequired,
NameComponentRequired,
EmptyFormattedName,
}
Expand description
Validation errors for schema compliance checking.
These errors occur when resource data doesn’t conform to the defined schema, providing detailed information about what validation rule was violated.
Variants§
MissingRequiredAttribute
Required attribute is missing
InvalidAttributeType
Attribute value doesn’t match expected type
Fields
ExpectedMultiValue
Multi-valued attribute provided as single value
ExpectedSingleValue
Single-valued attribute provided as array
UniquenesViolation
Attribute value violates uniqueness constraint
InvalidCanonicalValue
Invalid value for attribute with canonical values
Fields
MissingSubAttribute
Complex attribute missing required sub-attributes
Fields
UnknownAttribute
Unknown attribute in resource
Fields
Custom
General validation error with custom message
MissingSchemas
Missing schemas attribute
EmptySchemas
Empty schemas array
InvalidSchemaUri
Invalid schema URI format
UnknownSchemaUri
Unknown schema URI
DuplicateSchemaUri
Duplicate schema URI
MissingBaseSchema
Missing base schema
ExtensionWithoutBase
Extension without base schema
MissingRequiredExtension
Missing required extension
MissingId
Missing id attribute
EmptyId
Empty id value
InvalidIdFormat
Invalid id format
ClientProvidedId
Client provided id in creation
InvalidExternalId
Invalid external id
InvalidMetaStructure
Invalid meta structure
MissingResourceType
Missing meta resource type
InvalidResourceType
Invalid meta resource type
ClientProvidedMeta
Client provided meta
InvalidCreatedDateTime
Invalid created datetime
InvalidModifiedDateTime
Invalid modified datetime
InvalidLocationUri
Invalid location URI
InvalidVersionFormat
Invalid version format
InvalidDataType
Invalid data type for attribute
Fields
InvalidStringFormat
Invalid string format
Fields
InvalidBooleanValue
Invalid boolean value
Fields
InvalidDecimalFormat
Invalid decimal format
Fields
InvalidIntegerValue
Invalid integer value
Fields
InvalidDateTimeFormat
Invalid datetime format
Fields
InvalidBinaryData
Invalid binary data
Fields
InvalidReferenceUri
Invalid reference URI
Fields
InvalidReferenceType
Invalid reference type
Fields
BrokenReference
Broken reference
Fields
SingleValueForMultiValued
Single value provided for multi-valued attribute
ArrayForSingleValued
Array provided for single-valued attribute
MultiplePrimaryValues
Multiple primary values in multi-valued attribute
InvalidMultiValuedStructure
Invalid multi-valued structure
Fields
MissingRequiredSubAttribute
Missing required sub-attribute in multi-valued
Fields
MissingRequiredSubAttributes
Missing required sub-attributes in complex attribute
Fields
InvalidSubAttributeType
Invalid sub-attribute type in complex attribute
UnknownSubAttribute
Unknown sub-attribute in complex attribute
NestedComplexAttributes
Nested complex attributes (not allowed)
MalformedComplexStructure
Malformed complex attribute structure
CaseSensitivityViolation
Case sensitivity violation
ReadOnlyMutabilityViolation
Read-only mutability violation
ImmutableMutabilityViolation
Immutable mutability violation
WriteOnlyAttributeReturned
Write-only attribute returned
ServerUniquenessViolation
Server uniqueness violation
GlobalUniquenessViolation
Global uniqueness violation
InvalidCanonicalValueChoice
Invalid canonical value choice
UnknownAttributeForSchema
Unknown attribute for schema
RequiredCharacteristicViolation
Required characteristic violation
UnsupportedAttributeType
Unsupported attribute type for value object creation
InvalidAttributeName
Invalid attribute name mismatch
RequiredAttributeMissing(String)
Required attribute missing
NullValueForOptionalAttribute(String)
Null value for optional attribute (used in factory)
ExpectedArray(String)
Expected array for multi-valued attribute
InvalidPrimaryIndex
Invalid primary index for multi-valued attribute
NotMultiValued(String)
Attribute is not multi-valued
ReservedUsername(String)
Reserved username error
UsernameTooShort(String)
Username too short
UsernameTooLong(String)
Username too long
InvalidUsernameFormat(String)
Invalid username format
InvalidEmailDomain
Invalid email domain
WorkEmailRequired
Work email required
ExternalIdRequired
External ID required
NameComponentRequired
Name component required
EmptyFormattedName
Empty formatted name