Namespace LemonEdge.API.Attributes.Validation
Classes
DataSourceUniqueAttribute
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
DatabaseClassValidationAttribute
Allows you to create class level validation, instead of individual field level, that runs when directly connected to the database only
DatabasePropertyValidationAttribute
Allows you to write a formula against properties that are automatically evaluated to validate changes
DatabaseValidationAttribute
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
FileSafeNameValidationAttribute
Validates that the string property value conforms to a file safe name. See Utils.StringHelper.IsSafeFileName(string, bool)
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
MultipleUniqueAttribute
Enforces validation that the combination of specified property names must be unique for each instance of this object
PropertyValidationAttribute
Allows you to write a formula against properties that are automatically evaluated to validate changes
PropertyValidationByMethodAttribute
Attribute for validating objects/properties by targeting functions within classes the targeted function MUST ALWAYS RETURN A BOOLEAN
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
RequiredNoDefaultIDValidationAttribute
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 MultipleUniqueAttribute
UserSafeValidAttribute
Used exclusively by the IUser to ensure the default safe can only ever be set to a safe the user is a member of
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
ValidationHelper
Provides help functionality for retrieving standard information contained within the ValidationContext when working with a ValidationAttribute