Skip to main content

Not

Rule for checking if a value isn't the same as the provided value.

Example

import React from "react";
import {
createForm,
integerField,
booleanField,
StatefulFormView,
max,
not,
} from "@fab4m/fab4m";
import "@fab4m/fab4m/css/basic/basic.css";

const form = createForm({
age: integerField({
label: "How old are you?",
}),
feelOld: booleanField({
label: "Do you feel old?",
rules: [not([["age", max(40)]])],
}),
});

export default function OrExample() {
return <StatefulFormView form={form} hideSubmit={true} />;
}