<commit_before># react-form-logic

This is a form-handling library for React that makes it easy to:

* serialize forms into JSON and submit them to the server

* set up client-side validations without installing any additional
  libraries

* combine server-side validations with client-side validations in a
  streamlined way

* internationalize validation error messages

The library is also meant to:

* be small and self-contained

* keep your form-handling code similar to all your other React-based
  code

* have a stable API

* leave full control of the markup to your React components

* not interfere with any other custom dynamic behaviour you might want
  to build into your forms

## Getting started

You use react-form-logic be defining a form object, and then using it
to generate a wrapper component for the component that renders your
form.

The form object describes the fields your form has, the validations
those fields should have and additional event handlers for events
related to the form. Passing your event handlers in this way allows
react-form-logic to automatically combine your custom form logic with
the validaton logic.

It looks like this:

```javascript<commit_msg>Documentation improvements.<commit_after># react-form-logic

This is a form-handling library for React that makes it easy to:

* serialize forms into JSON and submit them to the server

* set up client-side validations without installing any additional
  libraries

* combine server-side validations with client-side validations in a
  streamlined way

* internationalize validation error messages

The library is also meant to:

* have a stable API

* be small and self-contained

* keep your form-handling code similar to all your other React-based
  code

* leave full control of the markup to your React components

* not interfere with any other custom dynamic behaviour you might want
  to build into your forms

## Getting started

You use react-form-logic be defining a form object, and then using it
to generate a wrapper component for the component that renders your
form.

The form object describes the fields your form has, the validations
those fields should have and additional event handlers for events
related to the form. Passing your event handlers in this way allows
react-form-logic to automatically combine your custom form logic with
the validaton logic.

It looks like this:

```javascript
{'fraction_non_alphanumeric': 0.03278008298755187, 'fraction_numerical': 0.0, 'mean_word_length': 4.369710467706013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '568839', 'n_tokens_mistral': 597, 'n_tokens_neox': 568, 'n_words': 348}