# alpine-validator

> Input validator for Alpine & Livewire

Latest version **1.0.2** (published 2022-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install alpine-validator
pnpm add alpine-validator
yarn add alpine-validator
bun add alpine-validator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-01-12 |
| First published | 2022-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aldo Zumaran |
| Maintainers | aldozumaran |
| Keywords | alpine, validator, livewire |

## Links

- npm: https://www.npmjs.com/package/alpine-validator
- Repository: https://github.com/aldozumaran/alpine-validator
- Homepage: https://github.com/aldozumaran/alpine-validator#readme
- Issues: https://github.com/aldozumaran/alpine-validator/issues
- npm.io page: https://npm.io/package/alpine-validator

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-01-12
- 1.0.1 — 2022-01-12
- 1.0.0 — 2022-01-12

## README

# Alpine Validator

Add Validator to your Alpine 3.x components with a custom directive.

> This package only supports Alpine v3.x.

## About

This plugin adds a new `x-validator` to Alpine.

## Installation

### CDN

Include the following `<script>` tag in the `<head>` of your document, just before Alpine.

### NPM

```bash
npm install alpine-validator
```

Add the `x-validator` directive to your project by registering the plugin with Alpine.

```js
import Alpine from "alpinejs";
import Validator from "alpine-validator";

Alpine.plugin(Validator);

window.Alpine = Alpine;
window.Alpine.start();
```

## Usage

To create a tooltip, use the `x-validator` directive on an element.

```html
<div x-validator>
    <input data-validator data-filter="numeric" />
</div>
```

## Versioning

This projects follow the [Semantic Versioning](https://semver.org/) guidelines.

## License

Copyright (c) 2021 Ryan Chandler and contributors

Licensed under the MIT license, see [LICENSE.md](LICENSE.md) for details.

---
_Source: https://npm.io/package/alpine-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
