error
Description
defines whether error styling is applied to an areaType
boolean
Default value
false
Example
<Area error={true} />
Details
The property is useful during a form validation. If the property is set to true
(or just specified without a value) and the input value fails validation, the Area control gets error styling: the control's borders and the entered text become red.
To add a red error label for the control, use the error property of the Field control:
<script>
import { Area, Field } from "wx-svelte-core";
</script>
<Field label="Error" error let:id>
<Area {id} error={true}/> <!-- equals to <Area {id} error/> -->
</Field>
Related article: Styling a validation error
Related sample: Textarea