Namespace LemonEdge.API.Attributes.Validation
Classes
DatabaseClassValidation
Allows you to create class level validation, instead of individual field level, that runs when directly connected to the database only
DatabasePropertyValidation
Allows you to write a formula against properties that are automatically evaluated to validate changes
DatabaseValidation
This indicates the validation is only run if the code is executing directly connected to the database If running through the web service this will not be executed This is for performance on validations to only run db checks once from the service, and also because running async code synchronously can lock up UI - especially xamarin UI
DataSourceUnique
Used only against the IDataSource object to validate that 3rd party data source keys are unique (if they are set as being unique in the IDataSourceType)
This should not be used against any other class for validation
FileSafeNameValidation
Validates that the string property value conforms to a file safe name. See IsSafeFileName(String, Boolean)
GlobalUniqueEmailAttribute
Only used to validate user email property and ensures that it is unique across all accounts within the database, not just the current logged in account
Helper
Provides help functionality for retrieving standard information contained within the System.ComponentModel.DataAnnotations.ValidationContext when working with a System.ComponentModel.DataAnnotations.ValidationAttribute
MultipleUnique
Enforces validation that the combination of specified property names must be unique for each instance of this object
PropertyValidation
Allows you to write a formula against properties that are automatically evaluated to validate changes
ReadOnlyAttribute
Indicates this property is read-only and can not be modified again by anything once it has been initially saved from new
For instance this is commonly used with auto-increment reference ids used in transactions
Requires the DBTrackChangesAttribute to be marked against this property as well
RequiredNoDefaultIDValidation
Indicates this is a required property and must have a value that is not the default value of that property type.
For instance if an integer it can not be 0, or if a Guid it can not be Guid.Empty
UniqueAttribute
Indicates this property must be unique across all instances of that type.
Commonly used on key properties, or names/codes that must be unique
If multiple properties need to be unique together you can use MultipleUnique
UserTeamValidAttribute
Used exclusively by the IUser to ensure the default team can only ever be set to a team the user is a member of