astro-reactive-form/packages/form/components/Errors.astro
Ayo Ayco 3d361fcb5b
refactor: form package cleanup (#135)
* refactor: form package cleanup

* refactor: organize components folder
2022-10-23 23:04:40 +02:00

17 lines
235 B
Text

---
import type { ValidationError } from 'common/types';
export interface Props {
errors: ValidationError[];
}
const { errors = [] } = Astro.props;
---
{
errors.map((error) => (
<li>
{error.error} {error.limit}
</li>
))
}