Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
celyes authored Dec 11, 2023
1 parent dabd705 commit adc05f5
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Checkr
# Validate

Checkr is a powerful validation library that enables developers to easily and accurately validate user input and other
data. With Checkr, you can quickly perform a wide range of checks, and ensuring that data conforms to specific
formatting requirements. With a simple and intuitive API, Checkr is easy to integrate into any project, and its flexible
Validate is a powerful validation library that enables developers to easily and accurately validate user input and other
data. With Validate, you can quickly perform a wide range of checks, and ensuring that data conforms to specific
formatting requirements. With a simple and intuitive API, Validate is easy to integrate into any project, and its flexible
configuration options make it a powerful
tool for building robust and reliable applications.
### Installation
```shell
pip install checkr
pip install Validate
```

### Usage

1. First of all, You need to create a request class that has two methods:

```python
from checkr.BaseRequest import BaseRequest
from Validate.BaseRequest import BaseRequest
from typing import Dict


Expand All @@ -36,8 +36,8 @@ class SampleRequest(BaseRequest):
2. Use the request class to validate data:

```python
from checkr import validate
from checkr.exceptions import ValidationError
from Validate import validate
from Validate.exceptions import ValidationError


request_data = {
Expand All @@ -63,7 +63,7 @@ you can use the `messages` method. Here's an example:

```python
from typing import Dict
from checkr.BaseRequest import BaseRequest
from Validate.BaseRequest import BaseRequest


class SampleRequest(BaseRequest):
Expand All @@ -86,7 +86,7 @@ You can accomplish this by using the `prepare_for_validation` hook as demonstrat

```python
from typing import Dict
from checkr.BaseRequest import BaseRequest
from Validate.BaseRequest import BaseRequest


class SampleRequest(BaseRequest):
Expand All @@ -108,7 +108,7 @@ Notice that this method will not run if the validation finds invalid data.

```python
from typing import Dict
from checkr.BaseRequest import BaseRequest
from Validate.BaseRequest import BaseRequest


class SampleRequest(BaseRequest):
Expand Down Expand Up @@ -171,7 +171,7 @@ this:

```python
from typing import Any
from checkr.rules.BaseRule import BaseRule
from Validate.rules.BaseRule import BaseRule

class CustomRule(BaseRule):

Expand Down Expand Up @@ -199,7 +199,7 @@ After creating the custom rule, you can use it anywhere like this:

```python
from typing import Dict
from checkr.BaseRequest import BaseRequest
from Validate.BaseRequest import BaseRequest

# import the custom rule you created
from CustomRule import CustomRule
Expand All @@ -217,4 +217,4 @@ class SampleRequest(BaseRequest):
'phone': ['required', CustomRule()],
}

```
```

0 comments on commit adc05f5

Please sign in to comment.