Skip to content

Multiple custom validator durability #124

@Bellver0101

Description

@Bellver0101

My schema looks like this.

{
    "url": {
        type: String,
        required: true,
        use: {
            urlIncludesProtocol: function (val, inputCtx, path) {
                return false; // the code stops right here, but I want it keep running until it finishes
            },
            urlIncludesIp: function (val, inputCtx, path) {
                return false; // this,
            },
            urlIncludesPort: function (val, inputCtx, path) {
                return false; // and this.
            },

        }
    }
}

So If there are multiple custom validators in an element, even if one of them fails, I want it to keep validating until it finishes all of its remaining custom validators.

Is there any option for this? or do I have to do some work-around?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions