# redux-form-normalize-on-blur

> a Field component that supports a normalizeOnBlur property

Latest version **1.1.2** (published 2025-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-form-normalize-on-blur
pnpm add redux-form-normalize-on-blur
yarn add redux-form-normalize-on-blur
bun add redux-form-normalize-on-blur
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2025-05-15 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 2 |
| Unpacked size | 31.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Andy Edwards |
| Maintainers | jedwards1211 |
| Keywords | react, redux-form, normalize, formatted-input |

## Links

- npm: https://www.npmjs.com/package/redux-form-normalize-on-blur
- Repository: https://github.com/jcoreio/redux-form-normalize-on-blur
- Homepage: https://github.com/jcoreio/redux-form-normalize-on-blur#readme
- Issues: https://github.com/jcoreio/redux-form-normalize-on-blur/issues
- npm.io page: https://npm.io/package/redux-form-normalize-on-blur

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.0.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.18.6

## 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.1.2 (latest) — 2025-05-15
- 1.1.1 — 2025-05-15
- 1.1.0 — 2024-03-05
- 1.0.7 — 2019-12-06
- 1.0.6 — 2019-12-05
- 1.0.5 — 2019-05-20
- 1.0.4 — 2019-01-24
- 1.0.3 — 2018-12-19
- 1.0.2 — 2018-12-12
- 1.0.1 — 2018-01-18
- 1.0.0 — 2018-01-12

## README

# redux-form-normalize-on-blur

[![Build Status](https://travis-ci.org/jcoreio/redux-form-normalize-on-blur.svg?branch=master)](https://travis-ci.org/jcoreio/redux-form-normalize-on-blur)
[![Coverage Status](https://codecov.io/gh/jcoreio/redux-form-normalize-on-blur/branch/master/graph/badge.svg)](https://codecov.io/gh/jcoreio/redux-form-normalize-on-blur)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![npm version](https://badge.fury.io/js/redux-form-normalize-on-blur.svg)](https://badge.fury.io/js/redux-form-normalize-on-blur)

a `redux-form` `Field` component that supports a `normalizeOnBlur` property

# Usage

```sh
npm install --save redux-form-normalize-on-blur
```

```js
const { Field } = require('redux-form-normalize-on-blur')
```

or

```js
const { Field } = require('redux-form-normalize-on-blur/immutable')
```

## Example

The following field will trim its text when it loses focus:

```js
<Field
  name="name"
  normalizeOnBlur={(value) => value && value.trim()}
  component={YourInputComponent}
/>
```

## API

### `Field`

Has the same API as `redux-form`'s `Field`, but it accepts an additional `normalizeOnBlur` property:

#### `normalizeOnBlur?: (value: any) => any`

Function that takes the current value and returns the normalized value.
NOTE: this happens before `parse` or `normalize`!

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