<commit_before># cerebral-forms
Signals, actions and state factories to create forms

## API
Cerebral forms is basically a function that creates state needed to handle validation and an action factory for validating fields. It is simple in nature, but handles

### form
A state factory for creating form state. Used when defining initial state or dynamically with an action. You can put forms inside forms.

```js
import {form} from 'cerebral-forms'

export default {
  state: {
    form: form({
      firstName: {
        // The initial value
        value: '',
        // Validation rules with name and arguments passed in
        // with colon separation
        validationRules: ['minLength:3'],
        // Error messages mapped to same index as validation rule
        errorMessages: ['Must be at least 3 characters long'],
        // When setting isRequired to true the field will be invalid if there
        // is no value. To determine if there is not value, check "isValueRules" below
        isRequired: false,
        // Will only be valid if this other field is also valid.
        // Point to a field in the model
        dependsOn: 'app.myForm.repeatPassword'

        // Some properties are default and rarely changed, but you
        // are free to change them
<commit_msg>docs(forms): update README (#423)<commit_after># cerebral-forms
Signals, actions and state factories to create forms

## API
Cerebral forms is basically a function that creates state needed to handle validation and an action factory for validating fields. It is simple in nature, but handles

### form
A state factory for creating form state. Used when defining initial state or dynamically with an action. You can put forms inside forms.

```js
import {form} from 'cerebral-forms'

export default {
  state: {
    form: form({
      firstName: {
        // The initial value
        value: '',
        // Validation rules with name and arguments passed in
        // with colon separation
        validationRules: ['minLength:3'],
        // Error messages mapped to same index as validation rule
        errorMessages: ['Must be at least 3 characters long'],
        // When setting isRequired to true the field will be invalid if there
        // is no value. To determine if there is not value, check "isValueRules" below
        isRequired: false,
        // Will only be valid if this other field is also valid.
        // Point to a field in the model
        dependsOn: 'app.myForm.repeatPassword'
        // You could also add an array to dependsOn to support multiple depends
        // dependsOn: ['app.myForm.repeatPassword', 'app.someOtherForm.someField']
        
        // Some properties are default and rarely changed, but you
        // are free to change them

{'fraction_non_alphanumeric': 0.06717226435536294, 'fraction_numerical': 0.002527988443481401, 'mean_word_length': 2.6688741721854305, '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': '5265897', 'n_tokens_mistral': 677, 'n_tokens_neox': 655, 'n_words': 354}