import {Button, Form, NumberInput} from "@heroui/react"; export default function App() { const [submitted, setSubmitted] = React.useState(null); const [amount, setAmount] = React.useState(null); const errors = []; const onSubmit = (e) => { e.preventDefault(); const data = Object.fromEntries(new FormData(e.currentTarget)); setSubmitted(data); }; if (!amount) { errors.push("The value must not be empty"); } if (amount < 100) { errors.push("The value must be greater than 100"); } if (amount > 1000) { errors.push("The value must be less than 1000"); } return (
); }