@mdfx/nette-form-validator

0.2.3 • Public • Published

Simple nette form validator

Proclamation

This package's name may be a little confusing, because for now the only ability of the package is to validate Nette input form element, based upon its rules. The logic behind validating whole forms need to be added manually.

Compatibility

The package is not built and uses ES6 features. Consider using transpiler.

Installation

npm install @mdfx/nette-form-validator

Usage

The package has only one exposed function validateElement, which return either error message or null.

import { validateElement } from "@mdfx/nette-form-validator";

...

const errorMessage = validateElement(inputElement)

if (errorMessage === null) {
    console.log('No error')
} else {
    console.log(errorMessage) 
}

Readme

Keywords

none

Package Sidebar

Install

npm i @mdfx/nette-form-validator

Weekly Downloads

2

Version

0.2.3

License

ISC

Unpacked Size

4.69 kB

Total Files

6

Last publish

Collaborators

  • david.strunc
  • ondrejznojil
  • prazak_madfox