ng-fveh
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Ng-Fveh - Form Validations Errors Helper

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 :)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.6
    2
    • latest

Version History

Package Sidebar

Install

npm i ng-fveh

Weekly Downloads

2

Version

0.0.6

License

MIT

Unpacked Size

244 kB

Total Files

42

Last publish

Collaborators

  • guiwaess