Add CONTRIBUTING.md file
This commit is contained in:
parent
e2492d5dd4
commit
d2b5a3c895
|
|
@ -0,0 +1,34 @@
|
|||
# Hi!
|
||||
Thanks to contribute in this project. **Changes and contributions must be added as pull request**
|
||||
|
||||
## Add a new dictionary
|
||||
|
||||
You can help to make this project better by adding a new dictionary of swear words in your native language. The dictionary file MUST follow this points:
|
||||
|
||||
1. It must be a `.php` file in `src/dict`
|
||||
2. Its filename must be a valid language code, check [here](https://www.science.co.il/language/Locale-codes.php)
|
||||
3. It must return an array with your swear words
|
||||
4. You MUST use array brackets declaration instead of `array()` function.
|
||||
5. Each word must be in a single line
|
||||
6. Each word must be single quoted
|
||||
7. Each word MUST NOT contains accents
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
return [
|
||||
'fuck',
|
||||
'suck'
|
||||
];
|
||||
```
|
||||
|
||||
**You should provide test of loading and using your dictionary.**
|
||||
|
||||
## Extends a dictionary
|
||||
|
||||
Also, you can contribute by adding new words in a existing dictionary. You MUST to follow from 5 to 7 in the points above.
|
||||
|
||||
## Improvements
|
||||
|
||||
Any other improvements are very welcome. Check for [issues](https://github.com/arandilopez/laravel-profane/issues). Remember to provide test for your changes.
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
I made this package to perform a validation for swearwords using Laravel validation service.
|
||||
|
||||
## Instalation
|
||||
## Installation
|
||||
|
||||
Install via composer
|
||||
```shell
|
||||
|
|
@ -39,7 +39,7 @@ Publish vendor lang files if you need to replace by your own.
|
|||
php artisan vendor:publish
|
||||
```
|
||||
|
||||
## How to use
|
||||
## Usage
|
||||
|
||||
This package register a custom validator. You can use in your controller's `validate` function.
|
||||
|
||||
|
|
@ -107,6 +107,8 @@ If you're interesting in contributing code to this project, clone it by running:
|
|||
git clone git@github.com:arandilopez/laravel-profane.git
|
||||
```
|
||||
|
||||
Please read the [CONTRIBUTING](CONTRIBUTING.md) file.
|
||||
|
||||
Pull requests are welcome, but please make sure you provide unit tests to cover your changes. **You can help to add and support more locales!**
|
||||
|
||||
*Thanks to [@dorianneto](https://github.com/dorianneto) for his contributions.*
|
||||
|
|
|
|||
Loading…
Reference in New Issue