# Forms Support

The Switch component can be easily integrated with [HTML5 form](https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms) as well as [Kendo UI for Vue Form](https://www.telerik.com/kendo-vue-ui/components/form) (or other third-party solutions).

The forms supports enables you to validate switch values and prevent the submission of forms which are in an invalid state.

> In addition to the exposed form support settings, the [Switch](https://www.telerik.com/kendo-vue-ui/components/inputs/api/switchprops) provides the same properties and behaves in the same way as a native HTML [`input[type=checkbox]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox) element.

## Functionality and Features

* [Support for Kendo UI for Vue Form and Setting Custom Behavior](https://www.telerik.com/kendo-vue-ui/components/inputs/switch/forms-support#support-for-kendo-ui-for-vue-form-and-setting-custom-behavior)
* [Setting Validation Requirements](https://www.telerik.com/kendo-vue-ui/components/inputs/switch/forms-support#setting-validation-requirements)
* [Setting Custom Validation Messages](https://www.telerik.com/kendo-vue-ui/components/inputs/switch/forms-support#setting-custom-validation-messages)

### Support for Kendo UI for Vue Form and Setting Custom Behavior

The Kendo UI for Vue Form component [integrates with all Kendo UI for Vue components](https://www.telerik.com/kendo-vue-ui/components/form/custom-components/).

You can display error messages and fully customize the behavior of the rendered component by using the additional properties of the Field component.

The following example demonstrates how to render a required custom switch.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/inputs/switch/forms-support/overview/source.txt)

### Setting Validation Requirements

The Switch supports props for setting basic validation requirements. For example, the [`required`](https://www.telerik.com/kendo-vue-ui/components/inputs/api/switchprops#required) property which enables the successful form submission.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/inputs/switch/forms-support/form-required/source.txt)

### Setting Custom Validation Messages

You can implement custom error messages which will be displayed if the Switch is not turned on and the user tries to submit the form. To render a custom validation message, set the [`validationMessage`](https://www.telerik.com/kendo-vue-ui/components/inputs/api/switchprops#validationmessage) prop.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/inputs/switch/forms-support/custom-message/source.txt)

## Suggested Links

* [API Reference of the Switch Props](https://www.telerik.com/kendo-vue-ui/components/inputs/api/switchprops)
