checkRequired
Check selected fields exist and are not falsey. Numeric 0 is acceptable.
ts
import { checkRequired } from 'feathers-utils/hooks';Type declaration
ts
/**
* Check selected fields exist and are not falsey. Numeric 0 is acceptable.
*
* @see https://utils.feathersjs.com/hooks/check-required.html
*/
export declare function checkRequired<H extends HookContext = HookContext>(
fieldNames: MaybeArray<string>,
): (context: H, next?: NextFunction) => any| Argument | Type | Description |
|---|---|---|
| fieldNames | MaybeArray<string> |
| type | methods | multi |
|---|---|---|
| before, around | create, update, patch | yes |
