Intl
🖍️ 🛡 🚀
Validations done right.
Platform-agnostic validation library for JavaScript applications with extra focus on composable validations and message translations. Includes (pretty much) out-of-the-box support for both Redux Form and React Intl.
Create your validation schema based on priciples of functional programming.
Open Validarium in a RunKit sandbox!
This package provides translator for react-inl messages. Also convenient API for validations. ## API referenceintl
This package provides translator for react-inl messages. Also convenient API for validations.
-
intl
-
.validateTranslated ⇒
Object
-
.validateTranslated(intl, ...fns, values) ⇒
Object
-
.translateResult(intl, result) ⇒
Object
-
.validateTranslated ⇒
Object
intl.validateTranslated ⇒ Composed validate with translate. Gives you translated result directly. Params are curried
Returns: Object
- Translated result.
Sig: Object -> Object -> Object -> Object
Param | Type |
---|---|
intl | Object |
scheme | Object |
values | Object |
Object
intl.validateTranslated(intl, ...fns, values) ⇒ combine combineValidate with translate result.
Returns: Object
- Translated result.
Sig: (Object, ...Functions) -> Object -> Object
Param | Type | Description |
---|---|---|
intl | Object |
|
...fns | function |
Validation functions. |
values | Object |
Object
intl.translateResult(intl, result) ⇒ Translate result of validations with react-intl
.
We assume that intl
object is from react-intl
(usually obtained by injectIntl
).
Returns: Object
- Translated result.
Param | Type | Description |
---|---|---|
intl | Object |
|
result | Object |
to translate |
Related projects
- @redux-tools – Maintaining large Redux applications with ease.
- react-union – Integrate React apps into various CMSs seamlessly.
- lundium – Beautiful React component library.
License
All packages are distributed under the MIT license. See the license here.