diff --git a/.gitignore b/.gitignore index 61f2900..af96bda 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ *~ *.log node_modules +*.env +.DS_Store +package-lock.json diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 320baf5..25d6d65 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -22,12 +22,14 @@ validate5.skips.push(function (c) { ``` #### Params + - **String** `forms`: The form(s) selector you want to automagically validate on submit. ### `validateInput(input)` Validates an input element. #### Params + - **HTMLElement** `input`: The input to validate. #### Return @@ -37,6 +39,7 @@ Validates an input element. Iterate the inputs in the provided form. #### Params + - **HTMLElement** `formElm`: The form element. - **Function** `cb`: The callback function. @@ -47,6 +50,7 @@ Iterate the inputs in the provided form. Validates the form element. #### Params + - **HTMLElement** `formElm`: The form element. #### Return @@ -56,6 +60,7 @@ Validates the form element. Validates the form and displays the errors. #### Params + - **HTMLElement** `formElm`: The `
` element to validate. #### Return diff --git a/README.md b/README.md index b8ca1b6..6f6da38 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ + + # validate5 - [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Version](https://img.shields.io/npm/v/validate5.svg)](https://www.npmjs.com/package/validate5) [![Downloads](https://img.shields.io/npm/dt/validate5.svg)](https://www.npmjs.com/package/validate5) + [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/validate5.svg)](https://www.npmjs.com/package/validate5) [![Downloads](https://img.shields.io/npm/dt/validate5.svg)](https://www.npmjs.com/package/validate5) > Form validations made easy. @@ -47,13 +49,15 @@ $ npm i --save validate5 validate5("form"); ``` + + ## :question: Get Help There are few ways to get help: 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question. 2. For bug reports and feature requests, open issues. :bug: - 3. For direct and quick help from me, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket: + 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket: ## :memo: Documentation @@ -79,12 +83,14 @@ validate5.skips.push(function (c) { ``` #### Params + - **String** `forms`: The form(s) selector you want to automagically validate on submit. ### `validateInput(input)` Validates an input element. #### Params + - **HTMLElement** `input`: The input to validate. #### Return @@ -94,6 +100,7 @@ Validates an input element. Iterate the inputs in the provided form. #### Params + - **HTMLElement** `formElm`: The form element. - **Function** `cb`: The callback function. @@ -104,6 +111,7 @@ Iterate the inputs in the provided form. Validates the form element. #### Params + - **HTMLElement** `formElm`: The form element. #### Return @@ -113,6 +121,7 @@ Validates the form element. Validates the form and displays the errors. #### Params + - **HTMLElement** `formElm`: The `` element to validate. #### Return @@ -132,6 +141,7 @@ this takes time. You can integrate and use these projects in your applications * However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it: - Starring and sharing the projects you like :rocket: + - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book: - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone). - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`