<commit_before>Live Form Validation (for Nette Forms 2.4)
==========================================
Nice client-side live form validation for Nette Forms 2.4.

Script by default works nicely with Twitter Bootstrap 3, but you can customize the options to fit your exact needs.

Installation
------------
All you need is to link `live-form-validation.js` file from to your HTML document. That's it!

The script already contains the `netteForms.js` file, so don't use it again and remove it from your HTML document.

Options
-------
You can change default options by calling `LiveForm.setOptions({ ... });` after including the script. Give only options that you want to change. For example:

```js
<script src="/js/live-form-validation.js"></script> 
<script>
	LiveForm.setOptions({
		messageErrorPrefix: 'Error: ',
		wait: 500
	});
</script> 
```

### Available options

Option | Description
------ | -----------
**showMessageClassOnParent** | CSS class of control's parent where error/valid class should be added; or "false" to use control directly
**messageParentClass** | CSS class of control's parent where error/valid message should be added (fallback to direct parent if not found); or "false" to use control's direct parent
**controlErrorClass** | CSS class for an invalid control<commit_msg>Update readme about setting options before loading<commit_after>Live Form Validation (for Nette Forms 2.4)
==========================================
Nice client-side live form validation for Nette Forms 2.4.

Script by default works nicely with Twitter Bootstrap 3, but you can customize the options to fit your exact needs.

Installation
------------
All you need is to link `live-form-validation.js` file from to your HTML document. That's it!

The script already contains the `netteForms.js` file, so don't use it again and remove it from your HTML document.

Options
-------
You can change default options by calling `LiveForm.setOptions({ ... });` **after** including the script. Give only options that you want to change. For example:

```js
<script src="/js/live-form-validation.js"></script> 
<script>
	LiveForm.setOptions({
		messageErrorPrefix: 'Error: ',
		wait: 500
	});
</script> 
```

Alternatively, if you want to set options **before** the script is loaded, create `LiveFormOptions = { ... };` with options that you want to change. For example:

```js
<script>
	LiveFormOptions = {
		messageErrorPrefix: 'Error: ',
		wait: 500
	};
</script> 
<script src="/js/live-form-validation.js"></script> 
```

### Available options

Option | Description
------ | -----------
**showMessageClassOnParent** | CSS class of control's parent where error/valid class should be added; or "false" to use control directly
**messageParentClass** | CSS class of control's parent where error/valid message should be added (fallback to direct parent if not found); or "false" to use control's direct parent
**controlErrorClass** | CSS class for an invalid control
{'fraction_non_alphanumeric': 0.14454976303317535, 'fraction_numerical': 0.006431956668923494, 'mean_word_length': 4.148083623693379, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4272756', 'n_tokens_mistral': 812, 'n_tokens_neox': 756, 'n_words': 356}