#Assert two fields aren't equal

2 messages · Page 1 of 1 (latest)

green tendonBOT
dim schooner
#

I "solved" (?) this using the following method:

validate: (value, ctx) => {
    if (
        value ===
        (ctx.siblingData as Partial<any>).homeSquad
    ) {
        return "Home and away squads must be different"
    }
    // @ts-ignore
    return relationship(value, ctx)
},```