All Projects → dleitee → Valid.js

dleitee / Valid.js

Licence: mit
📝 A library for data validation.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Valid.js

validada
Another library for defensive data analysis.
Stars: ✭ 29 (-95.2%)
Mutual labels:  data, validation
Nice Validator
Simple, smart and pleasant validation solution.
Stars: ✭ 587 (-2.81%)
Mutual labels:  validation
Validation
PHP Standalone Validation Library
Stars: ✭ 520 (-13.91%)
Mutual labels:  validation
Machine Learning Mindmap
A mindmap summarising Machine Learning concepts, from Data Analysis to Deep Learning.
Stars: ✭ 5,339 (+783.94%)
Mutual labels:  data
Countly Server
Countly helps you get insights from your application. Available self-hosted or on private cloud.
Stars: ✭ 4,857 (+704.14%)
Mutual labels:  data
Checkmail
Golang package for email validation
Stars: ✭ 554 (-8.28%)
Mutual labels:  validation
Sklearn Classification
Data Science Notebook on a Classification Task, using sklearn and Tensorflow.
Stars: ✭ 518 (-14.24%)
Mutual labels:  data
Pdpipe
Easy pipelines for pandas DataFrames.
Stars: ✭ 590 (-2.32%)
Mutual labels:  data
Iexfinance
Python SDK for IEX Cloud
Stars: ✭ 573 (-5.13%)
Mutual labels:  data
Express Validator
An express.js middleware for validator.js.
Stars: ✭ 5,236 (+766.89%)
Mutual labels:  validation
Superstruct
A simple and composable way to validate data in JavaScript (and TypeScript).
Stars: ✭ 5,604 (+827.81%)
Mutual labels:  validation
Footballdata
A hodgepodge of JSON and CSV Football/Soccer data
Stars: ✭ 526 (-12.91%)
Mutual labels:  data
Firely Net Sdk
The official Firely .NET SDK for HL7 FHIR
Stars: ✭ 560 (-7.28%)
Mutual labels:  validation
Disk.frame
Fast Disk-Based Parallelized Data Manipulation Framework for Larger-than-RAM Data
Stars: ✭ 517 (-14.4%)
Mutual labels:  data
Vue Mc
Models and Collections for Vue
Stars: ✭ 588 (-2.65%)
Mutual labels:  validation
Accord
Accord: A sane validation library for Scala
Stars: ✭ 519 (-14.07%)
Mutual labels:  validation
Swiftcop
SwiftCop is a validation library fully written in Swift and inspired by the clarity of Ruby On Rails Active Record validations.
Stars: ✭ 544 (-9.93%)
Mutual labels:  validation
Store Receipt Validator
PHP receipt validator for Apple iTunes, Google Play and Amazon App Store
Stars: ✭ 547 (-9.44%)
Mutual labels:  validation
Datasheets
Read data from, write data to, and modify the formatting of Google Sheets
Stars: ✭ 593 (-1.82%)
Mutual labels:  data
Vvalidator
🤖 An easy to use form validator for Kotlin & Android.
Stars: ✭ 592 (-1.99%)
Mutual labels:  validation

Build Status Coverage Status Code Climate

A library for data validation.

Install

ValidateJS is available on npm:

npm install valid.js --save

or bower:

bower install valid.js

Usage

With ES6/import

import {validate, string, util, isValid} from 'valid.js'

let testIsValid = validate(string.maxLength(15), util.isRequired)
let result = testIsValid('Test ValidateJS')
// result => true

// or using the 'isValid' shorthand method
let result = isValid('Test ValidateJS', [string.maxLength(15), util.isRequired])
// result => true

With require

var validatejs = require('valid.js')
var validate = validatejs.validate,
    isValid = validatejs.isValid,
    string = validatejs.string,
    util = validatejs.util

var testIsValid = validate(string.maxLength(15), util.isRequired)
var result = testIsValid('Test ValidateJS')
// result => true

// or using the 'isValid' shorthand method
var result = isValid('Test ValidateJS', [string.maxLength(15), util.isRequired])
// result => true

With Browser

<script src="./bower_components/valid.js/dist/validate.js"></script>
var validate = validate.validate
var string = validate.string
var util = validate.util

var testIsValid = validate(string.maxLength(15), util.isRequired)
var result = testIsValid('Test ValidateJS')
// result => true

OR

var validate = window.validate.validate
var string = window.validate.string
var util = window.validate.util

var testIsValid = validate(string.maxLength(15), util.isRequired)
var result = testIsValid('Test ValidateJS')
// result => true

OR

var isValid = window.validate.isValid
var string = window.validate.string
var util = window.validate.util

var result = isValid('Test ValidateJS', [string.maxLength(15), util.isRequired])
// result => true

Also available for AMD

Validation Functions

  • [x] String
    • [x] isString
    • [x] minLength(min)
    • [x] maxLength(max)
    • [x] length(min, max)
    • [x] regex(reg)
  • [x] Number
    • [x] isNumber
    • [x] minNumber
    • [x] maxNumber
    • [x] between
  • [x] Date
    • [x] isDate
    • [x] minDate(min)
    • [x] maxDate(max)
    • [x] between(min, max)
  • [x] Bool
    • [x] isTrue
    • [x] isFalse
  • [x] Util
    • [x] isRequired
    • [x] isEmail
    • [x] isCep
    • [x] isUrl
    • [x] isHexColor
    • [x] isCpf
    • [x] isCnpj
  • [x] Credit Card
    • [x] isVisa
    • [x] isElo
    • [x] isHipercard
    • [x] isMasterCard
    • [x] isDiners
    • [x] isAmex
    • [x] isCreditCard

Contributing

Send us a Pull Request! Here is how:

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Stage your changes: git add .
  4. Commit your changes: git commit -m 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request

LICENSE

The MIT License (MIT)

Copyright (c) 2015 Daniel Leite de Oliveira

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].