<commit_before>Validators availables
==========================


At the moment, the library support this validations:

* :ref:`in_integer`
* :ref:`in_string`
* :ref:`in_boolean`
* :ref:`in_lenght`



.. _in_integer:

ValidateInteger
---------------

Check if the new value is a valid ``int`` or ``long`` type


Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
| allow_null              | True                 | Allow ``null`` values                                           |
+-------------------------+----------------------+-----------------------------------------------------------------+


.. _in_string:

ValidateString
--------------

Check if the new value is a valid ``string`` type.

Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
| allow_null              | True                 | Allow ``null`` values                                           |
+-------------------------+----------------------+-----------------------------------------------------------------+



.. _in_boolean:

ValidateBoolean
---------------

Check if the new value is a valid ``bool`` type.

Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+



.. _in_lenght:

ValidateLenght
--------------

Check if the new value is a valid ``string`` type.

Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
| max_lenght              | None                 | Maxium value lenght                                            |
+-------------------------+----------------------+-----------------------------------------------------------------+







Example
-------

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
|                         |                      |                                                                 |
+-------------------------+----------------------+-----------------------------------------------------------------+
|                         |                      |                                                                 |
+-------------------------+----------------------+-----------------------------------------------------------------+<commit_msg>Documentation typo<commit_after>Validators availables
==========================


At the moment, the library support this validations:

* :ref:`in_integer`
* :ref:`in_string`
* :ref:`in_boolean`
* :ref:`in_lenght`



.. _in_integer:

ValidateInteger
---------------

Check if the new value is a valid ``int`` or ``long`` type


Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
| allow_null              | True                 | Allow ``null`` values                                           |
+-------------------------+----------------------+-----------------------------------------------------------------+


.. _in_string:

ValidateString
--------------

Check if the new value is a valid ``string`` type.

Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
| allow_null              | True                 | Allow ``null`` values                                           |
+-------------------------+----------------------+-----------------------------------------------------------------+



.. _in_boolean:

ValidateBoolean
---------------

Check if the new value is a valid ``bool`` type.

Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+



.. _in_lenght:

ValidateLenght
--------------

Check if the new value is a valid ``string`` type.

Optional parametes:

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
| max_lenght              | None                 | Maximum value lenght                                            |
+-------------------------+----------------------+-----------------------------------------------------------------+







Example
-------

+-------------------------+----------------------+-----------------------------------------------------------------+
| Parameter               | Default Value        | Description                                                     |
+=========================+======================+=================================================================+
| throw_exception         | False                | Throw a ``ValueError`` exception on validation fails            |
+-------------------------+----------------------+-----------------------------------------------------------------+
|                         |                      |                                                                 |
+-------------------------+----------------------+-----------------------------------------------------------------+
|                         |                      |                                                                 |
+-------------------------+----------------------+-----------------------------------------------------------------+
{'fraction_non_alphanumeric': 0.5302027306578403, 'fraction_numerical': 0.0, 'mean_word_length': 0.6066799601196411, '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': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4397266', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1124, 'n_words': 307}