# Switch >> Use Cases ||20
```js script
import { html } from '@mdjs/mdjs-preview';
import { Validator } from '@lion/form-core';
import { LionSwitch } from '@lion/switch';
import '@lion/switch/define';
import '@lion/helpers/define-sb-action-logger';
```
## Disabled
You can disable switches.
```html preview-story
```
## Validation
An example that illustrates how an info validation feedback can be always displayed.
```js preview-story
class IsTrue extends Validator {
static get validatorName() {
return 'IsTrue';
}
execute(value) {
return !value.checked;
}
static async getMessage() {
return "You won't get the latest news!";
}
}
class CustomSwitch extends LionSwitch {
static get validationTypes() {
return [...super.validationTypes, 'info'];
}
_showFeedbackConditionFor(type, meta) {
if (type === 'info') {
return true;
}
return super._showFeedbackConditionFor(type, meta);
}
}
customElements.define('custom-switch', CustomSwitch);
export const validation = () => html`
`;
```
## With checked-changed handler
You can listen for a `checked-changed` event that is fired when the switch is clicked.
```js preview-story
export const handler = ({ shadowRoot }) => {
return html`
{
shadowRoot.querySelector('sb-action-logger').log(`Current value: ${ev.target.checked}`);
}}"
>
`;
};
```