Most of the modern UI frameworks rely on some form of data state. For example, A simple HTML form in react is actually stored either in redux or internal react state. Many times we have faced situations where we have re written the same validations rules across or within the projects.
Maanyakaran is a sanskrit word which means “validation” is a step towards creating a validation framework which offers
Extensibility and reusability : Create your validation rules as simple JS functions with key as rule name and value as functions and Strategies.
Clean and readable implementation : Configure Maanyakaran once in project and keep reusing it by simply creating a readable constraint map.
Apply multiple rules on a single field and iterate over an array of objects : One of the features of maanyakarn enables you to apply multiple validation by just writing comma separated rules. Also it allows you to hint validation about an array of similar object hence validating all the elements of array by single set of constraints.
Abstract all validation and distribute them as Strategies. : Group all the validation rules in simple strategies and use them across multiple codebases.
Framework agnostic. : Written in vanilla JS and can be used on any framework or environment and supports all build tools.
Open source forever. Will be open source forever : Invite collaborators to review and improve this work.
NPM : https://www.npmjs.com/package/maanyakaran
Github : https://github.com/maanyakaran/core
Seasons Greetings and Best wishes