Skip to content

Commit

Permalink
add npm install
Browse files Browse the repository at this point in the history
  • Loading branch information
91ahmed committed Feb 20, 2023
1 parent a630221 commit ec53f84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if(inspect.valid()){
console.log(inspect.errors())
}
```
#### # Available Validation Rules
#### # Available Rules
` required() `
> The data must be not empty and it considered **_empty_** if the value is **_null_** or empty string or array.
Expand Down Expand Up @@ -88,7 +88,7 @@ inspect.data('ahmed').field('fieldname').pattern(/^[A-Za-z ]*$/)
```

` match() `
> The data should match the given value. this rule usually used to confirm the password.
> The data should match the given value.
``` javascript
// Example
const inspect = new JsInspector()
Expand Down Expand Up @@ -140,14 +140,14 @@ if(inspect.valid()){
```

` data() `
> Determine the data to be validated.
> Specify the data to be validated.
> It takes one parameter _(data)_
```javascript
data('value') // @param mixed, (data)
```

` field() `
> Determine the field name.. The class uses the value in this method for error messages, so it's very important to specify to get meaningful error messages.
> Specify the field name. The class uses the value in this method for error messages, so it's very important to specify to get meaningful error messages.
> It takes one parameter _(fieldname)_
```javascript
Expand Down

0 comments on commit ec53f84

Please sign in to comment.