Skip to content

Cannot chain .mustAsync method #18

@calebschoepp

Description

@calebschoepp

Maybe I missed this in the docs somewhere but I can't seem to chain .mustAsync and I'm unsure if I'm doing something wrong or if it is just not possible. The following example does not work. I'll keep digging in the docs and code but it'd be great if someone could help me understand why this does not work. Thanks 😄

import { AsyncValidator } from 'fluentvalidation-ts';

type MyType = {
    field: string;
};

class Test extends AsyncValidator<MyType> {
    constructor() {
        super();

        this.ruleFor('field')
            .mustAsync(async () => true)
            .mustAsync(async () => true);
    }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions