> For the complete documentation index, see [llms.txt](https://racoon-js.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://racoon-js.gitbook.io/en/other-common-api/validatesilent.md).

# validateSilent

validateSilent(\[value])

## Effect

The silent version of `validate`. `validateSilent` will not throw any error when validate failed. It will always return the `error` and `value`.

## Arguments

* `[value]` ***(\*)*** - The value to detect, default is `undefined`.

## Returns

Always return an object as below:

| Field | Necessary | Description                                                                                                                                          |
| ----- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| error | N         | The error object when validating failed. If validate passed, the field is`undefined`                                                                 |
| value | Y         | <p>When validating passed, value is the same as the return value of<code>validate.</code></p><p>Otherwise, value is the original detected value.</p> |

## Example

```javascript
const schema = racoon.number().min(0);
const { error, value } = schema.validateSilent(2);
if (error) {
  // fail
} else {
  // pass
}
```
