ng-form-rules - Simple, powerful, and customizable rule engine library for Angular reactive forms

sourceSource Code ondemand_videoVideo

ng-form-rules makes working with Angular reactive forms easier by providing a simple, powerful, and customizable rule engine library. You simply describe your data structure, rules, and logic, and we will create a form that hooks it all together for you.


Working with Angular reactive forms is great… until it sucks. As web developers, we work with forms all day long and anything we can do to make this easier will have a huge impact. We care about things like the sturcture of the form, if a control is valid, if a control is editable, reacting to changes in the form, etc. ng-form-rules was built to make all these things simpler and more powerful.


What does ng-form-rules do?

What does ng-form-rules NOT do?

“Show me the money!” (examples)

Watch our “Let’s Build a Registration Form” video for a great walkthrough of several key features of the library.

White belt

Form with one control having a simple validation rule.

Yellow belt

Form with one control having more complex validation rules.

Blue belt

Form with controls having synchronous and asynchronous validation rules.

Brown belt

Form with several types of controls (simple, group, array, etc.) with validation rules that listen for value changes in different areas of the form.

Black belt

Registration form utilizing many (but not all) of the common features of ng-form-rules.