All Projects → anjmao → ng-validators

anjmao / ng-validators

Licence: MIT license
⭐ Native angular 6+ form validators

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ng-validators

django-jsonfield-backport
Backport of the cross-DB JSONField model and form fields from Django 3.1.
Stars: ✭ 36 (+111.76%)
Mutual labels:  forms
forms
[DEPRECATED] Form controls for Nette Framework
Stars: ✭ 50 (+194.12%)
Mutual labels:  forms
angular-dynamic-forms
On-the-fly form generation from data with Angular
Stars: ✭ 21 (+23.53%)
Mutual labels:  forms
formularium
Formularium is a FOSS, privacy-first, and user-friendly toolkit for municipalities to support them in making their public services available online.
Stars: ✭ 88 (+417.65%)
Mutual labels:  forms
rakered
The open source components from rake.red
Stars: ✭ 28 (+64.71%)
Mutual labels:  forms
react-dynamic-forms
Dynamic forms library for React
Stars: ✭ 35 (+105.88%)
Mutual labels:  forms
RDForm
Create and edit RDF data in a HTML form
Stars: ✭ 16 (-5.88%)
Mutual labels:  forms
react-formular
This libraray is an experimental approach to bind forms and its inputs and editors together using the new React Context API. It aims to be fully customizable and composable. It´s only a set of Higher-Order-Components. Because of the decoupled nature, Middlewares makes it easy to build custom Validations, Security Guards and other data interceptors.
Stars: ✭ 43 (+152.94%)
Mutual labels:  forms
formula-one
Strongly-typed React form state management
Stars: ✭ 66 (+288.24%)
Mutual labels:  forms
formurai
Lightweight and powerfull library for declarative form validation
Stars: ✭ 49 (+188.24%)
Mutual labels:  forms
svelte-multistep-form
Svelte MultiStep Form like, this component is still in beta stage
Stars: ✭ 29 (+70.59%)
Mutual labels:  forms
aurelia-form
Fun with forms! Form utilities to make stuff just a bit (a lot) easier.
Stars: ✭ 34 (+100%)
Mutual labels:  forms
react-formulation
Simple React form validation
Stars: ✭ 14 (-17.65%)
Mutual labels:  forms
vue-simpleform
Form library for vue. Inspired by Formik for react.
Stars: ✭ 40 (+135.29%)
Mutual labels:  forms
react-search
This package will help you create a pretty good and beautiful search. And other related features
Stars: ✭ 17 (+0%)
Mutual labels:  forms
MagicForm
The easiest way to make complex forms with validations.
Stars: ✭ 31 (+82.35%)
Mutual labels:  forms
twig-bulma-form-theme-bundle
A Twig Form Theme for Bulma 0.3.x for use with the Symfony 2.8 / 3.x framework
Stars: ✭ 24 (+41.18%)
Mutual labels:  forms
eightshift-forms
WordPress plugin project for Gutenberg forms
Stars: ✭ 23 (+35.29%)
Mutual labels:  forms
react-attire
A dress code for your React forms
Stars: ✭ 25 (+47.06%)
Mutual labels:  forms
p01contact
Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
Stars: ✭ 15 (-11.76%)
Mutual labels:  forms

npm version Build Status

Description

This repository contains native angular forms validators for both template driven and reactive forms.

Table of contents

Getting started

Install library

using npm

npm install @ng-validators/ng-validators --save 

using yarn

yarn add @ng-validators/ng-validators

Usage in reactive forms.

Import only validators you need for you form.

import { greaterThan } from '@ng-validators/ng-validators';

this.formBuilder.group({
    age: ['', greaterThan(18)]
});

Usage in template driven forms.

Import NgValidatorsModule @NgModule declarations.

import { NgValidatorsModule } from '@ng-validators/ng-validators';

@NgModule({
    imports: [NgValidatorsModule]
})
export class AppModule {
}

Now you can use validator directive in HTML template

<input class="form-control" type="text" ngModel name="gt" gt="10"/>

Validators

Angular built-in validators

  • required
  • minlength
  • maxlength
  • pattern

Custom validators

  • rangeLength
  • min
  • gt
  • gte
  • max
  • lt
  • lte
  • range
  • digits
  • number
  • url
  • email
  • date
  • minDate
  • maxDate
  • dateISO
  • creditCard
  • json
  • base64
  • uuid
  • equal
  • notEqual
  • equalTo
  • notEqualTo
  • Your validator can be here. PR is welcome :)

Contributing

Contributions are welcome. You can start by looking at issues with label Help wanted or creating new Issue with proposal or bug report. If you need validator but it is not listed here, you can submit PR with your validator.

License

MIT

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].