-
Notifications
You must be signed in to change notification settings - Fork 848
Open
Labels
type: featureIssues related to new features.Issues related to new features.
Description
Hello guys. I googled but did not find solution for this issue.
Why should I proceed validation of a certain field when the first rule is failed. For instance, I have a validation chain where 2 last validations query the database. Why should I conduct those queries anyway when the first validation is failed, that's waste of resources.
Example:
@isnotempty()
@ISINT()
@Validate(CheckForeignKeyValidator, [ {
targetClass: CategoryEntity.name,
targetAttribute: { referenceField: 'userId', foreignKey: 'id' }
} ], {
message: "Объект с данным айди не существует"
})
readonly userId: number;
When userId is float number, the third validation runs anyway.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: featureIssues related to new features.Issues related to new features.