@o3r/forms
TypeScript icon, indicating that this package has built-in type declarations

12.4.2 • Public • Published

Otter forms

Super cute Otter!

This package is an Otter Framework Module.

Description

Stable Version Bundle Size

One of the approaches for writing forms that Angular provides is called model-driven or reactive forms, which "provide a model-driven approach to handling form inputs whose values change over time". This type of form is applicable in many use cases, but there are a couple of exceptions where additional utilities may be useful.

These use cases include:

  • A container/presenter structure for components
  • Handling form submission at page level
  • Displaying the error message outside the form

To handle these, this module provides utilities to enhance the build of Angular reactive forms, including:

  • An asynchronous decorator (@AsyncInput) to ensure subscriptions are handled if the references of the input observables change.
  • Basic and custom validators to validate user input for accuracy and completeness.
  • A dedicated NgRX store for form errors to have the possibility of displaying error messages outside the form component.
  • Helper functions to handle the interactions with the forms.

How to install

ng add @o3r/forms

[!WARNING] This module requires @o3r/core to be installed.

Details

Find more information in the documentation.

Package Sidebar

Install

npm i @o3r/forms

Weekly Downloads

5,854

Version

12.4.2

License

BSD-3-Clause

Unpacked Size

108 kB

Total Files

70

Last publish

Collaborators

  • kpanot
  • vscaiceanu-1a
  • jbourgeois-1a
  • nicohoffmann
  • mrednic-1a