# univalid-strategy

> Abstract class of strategy for univalid module (base API)

Latest version **1.0.2** (published 2018-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install univalid-strategy
pnpm add univalid-strategy
yarn add univalid-strategy
bun add univalid-strategy
```

## 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 | 2018-07-04 |
| First published | 2018-03-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | 'stetsD' |
| Maintainers | stetsd |
| Keywords | password, input, univalid, validation, univalid-strategy, strategy, check, validate, form |

## Links

- npm: https://www.npmjs.com/package/univalid-strategy
- Repository: https://github.com/StetsD/univalid-strategy
- Homepage: https://github.com/StetsD/univalid-strategy#readme
- Issues: https://github.com/StetsD/univalid-strategy
- npm.io page: https://npm.io/package/univalid-strategy

## Dependencies (2)

- [pass-power](https://npm.io/package/pass-power.md) ^1.0.0
- [univalid-key-logger](https://npm.io/package/univalid-key-logger.md) ^1.0.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-07-04
- 1.0.1 — 2018-03-05
- 1.0.0 — 2018-03-01

## README

# univalid-strategy

Abstract class of strategy for [univalid](https://github.com/StetsD/univalid) module.


## Install

```sh
npm i univalid-strategy
```


## Usage

```js
const UnivalidStrategy = require('univalid-strategy');
class UnivalidStrategyDefault extends UnivalidStrategy {
    //...
}
```


## API

Methods are necessary for define and extend.

### applyFilter(filter, val)

Tests the pattern matching of symbols (by event)

**filter** - Type `string`

In current moment available patterns:
* oL - only latin symbols
* oC - only cyrillic symbols
* oN - only numbers
* oP - only numbers and latin symbols

**val** - Type `string`


### check()

### getValidationHandlers()

### set()

### get()

## OPTIONS

### validHandlers

```js
constructor(){
    this.validHandlers = {
        'required': (val) => {
            let data = val ? ('' + val).trim() : '';
            return !!data;
        }
    }
}
```
## License

ISC©

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