# required

## 作用

限制被检测值不为`undefined | null`.

## 参数

无

## 示例

```javascript
const schema1 = racoon.boolean();
schema1.validate(undefined); // pass, 返回值为 undefined
schema1.validate(null); // pass, 返回值为 null

const schema2 = racoon.boolean().required();
schema2.validate(undefined); // fail
schema2.validate(null); // fail
schema2.validate(false); // pass
```
