nextui/apps/docs/content/components/form/native-validation.raw.jsx
Peterl561 a66476d60c
fix(form): use native as default validation behavior (#4425)
* fix(form): use native as default validation behavior

* docs(form): delete explicit validationBehavior=native

* test(form): adjusted form test validation behaviors

* chore(form): adjusted stories with forms

* chore(changeset): changed form default validation behavior to native

* chore(changeset): removed packages with only test changes

* chore(changeset): change to patch

* chore(changeset): update package name

* refactor(docs): update package name

* refactor(docs): update to heroui

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>
2025-01-30 10:54:56 -03:00

25 lines
537 B
JavaScript

import {Form, Input, Button} from "@heroui/react";
export default function App() {
const onSubmit = (e) => {
e.preventDefault();
};
return (
<Form className="w-full max-w-xs" onSubmit={onSubmit}>
<Input
isRequired
errorMessage="Please enter a valid email"
label="Email"
labelPlacement="outside"
name="email"
placeholder="Enter your email"
type="email"
/>
<Button type="submit" variant="bordered">
Submit
</Button>
</Form>
);
}