Skip to content

NG Form Validations Errors Helper - Some helpers to help you with form validation :)

License

Notifications You must be signed in to change notification settings

guilhermewaess/ng-fveh

Repository files navigation

Build Status Coverage Status Version

Ng-Fveh - Form Validations Errors Helper

Install

npm install ng-fveh

This lib contains some helpers to make your life easier when we talk about Angular forms.

More info and documentation you can find on demo page

Errors presenter component - <fveh-errors-presenter [field]="form.get('field')>"

This component will show all errors from your field.

Fveh Form Is Valid Decorator @FvehFormIsValid('formName')

This decorator will prevent your function to be executed and will mark all controls as touched.

Fveh Group Match Validator

This custom validator should help you with field match validations, e.g. password and confirm password. To use it, you should create a new group in your form and send a extra parameters after controls:

{ validator: FvehValidators.groupMatch(['E-mail', 'Email Confirmation']) }

Param FrieldlyFieldNames: If the fields doens't match, it will generate a new error on field with this as a payload

Error: {
  fvehGroupMatch: {
     fields: friendlyFieldNames // ['E-mail', 'Email Confirmation']
  },
}

See the example on on demo page :)

About

NG Form Validations Errors Helper - Some helpers to help you with form validation :)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published