Make Validation

Make Validation

  • Docs
  • Help
  • Blog

›API

Getting Started

  • Introduction
  • Installation

API

  • Array API
  • Enum API
  • String API

Example

  • ExpressJS Example

Useful Links

  • Youtube Videos

String

String validation can be done with the following options

Options

  • options.empty (default false) will check if the string is allowed to be empty '' or not.

Example

const result = makeValidation((types) => {
  return {
    payload: {
      firstName: 'Adeel', // valid
      lastName: 'Imran', // valid
      email: '', // invalid
      sex: '', // valid
    },
    checks: {
      firstName: { type: types.string },
      lastName: { type: types.string },
      email: { type: types.string, options: { empty: false } },
      sex: { type: types.string, options: { empty: true } },
    },
  };
});
← Enum APIExpressJS Example →
  • Options
  • Example
Make Validation
Docs
Getting StartedAPI ReferenceExamples
Community
User ShowcaseStack OverflowTwitter
More
BlogGitHub
Copyright © 2020 Adeel Imran