0.0.5 • Published 7 years ago

pure-validation v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

pure-validation

Greenkeeper badge Build Status npm package Dependency Status devDependency Status

A lightweight module for simple object validation.

Installation

yarn add pure-validation

API

getInitState

Returns an empty object - initial state of validation.

getFieldValidityExtension

Returns a new object with new field name and its validity state.

proptyperequireddescription
fieldNamestringtrueA field name
isOkbooltrueA validity value

setFieldValidity

Returns a new object with new field names and their validity states.

proptyperequireddescription
fieldsobjecttrueAn object with list of field names and their validity states
fieldNamestringtrueA field name
isOkbooltrueA validity value

setFieldsValidity

Returns a new object with new field names and their validity states.

proptyperequireddescription
fieldsobjecttrueAn object with list of field names and their validity states
fieldValidityExtensionsarraytrueAn array of objects with field names and their validity states.

isFieldValid

proptyperequireddescription
fieldobjecttrueAn object with field name to check

isAllFieldsValid

proptyperequireddescription
fieldsobjecttrueAn object with field names and their values to check

isStringEmptyLike

proptyperequireddescription
valuestringtrueA value to check

isEmailLike

proptyperequireddescription
valuestringtrueA value to check

isPhoneLike

proptyperequireddescription
valuestringtrueA value to check

isUrlLike

proptyperequireddescription
valuestringtrueA value to check

License

MIT

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.1-rc.2

7 years ago

0.0.1-rc.1

7 years ago

0.0.1-rc.0

7 years ago