From ece8cd11555f67fc71b4d8a7c77758d1a8a23776 Mon Sep 17 00:00:00 2001 From: kenve Date: Tue, 27 Oct 2020 17:54:07 +0800 Subject: [PATCH] docs(v2): update the link of joi --- website/docs/lifecycle-apis.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/lifecycle-apis.md b/website/docs/lifecycle-apis.md index e597b792d47d..a97d1cc09359 100644 --- a/website/docs/lifecycle-apis.md +++ b/website/docs/lifecycle-apis.md @@ -21,15 +21,15 @@ Return validated and normalized options for the plugin. This method is called be ### `validate` -`validateOptions` is called with `validate` function which takes a **[Joi](https://www.npmjs.com/package/@hapi/joi)** schema and options as argument, returns validated and normalized options. `validate` will automatically handle error and validation config. +`validateOptions` is called with `validate` function which takes a **[Joi](https://www.npmjs.com/package/joi)** schema and options as argument, returns validated and normalized options. `validate` will automatically handle error and validation config. :::tip -[Joi](https://www.npmjs.com/package/@hapi/joi) is recommended for validation and normalization of options. +[Joi](https://www.npmjs.com/package/joi) is recommended for validation and normalization of options. ::: -If you don't use **[Joi](https://www.npmjs.com/package/@hapi/joi)** for validation you can throw an Error in case of invalid options and return options in case of success. +If you don't use **[Joi](https://www.npmjs.com/package/joi)** for validation you can throw an Error in case of invalid options and return options in case of success. ```js {8-11} title="my-plugin/src/index.js" module.exports = function (context, options) { @@ -71,15 +71,15 @@ Return validated and normalized configuration for the theme. ### `validate` -`validateThemeConfig` is called with `validate` function which takes a **[Joi](https://www.npmjs.com/package/@hapi/joi)** schema and `themeConfig` as argument, returns validated and normalized options. `validate` will automatically handle error and validation config. +`validateThemeConfig` is called with `validate` function which takes a **[Joi](https://www.npmjs.com/package/joi)** schema and `themeConfig` as argument, returns validated and normalized options. `validate` will automatically handle error and validation config. :::tip -[Joi](https://www.npmjs.com/package/@hapi/joi) is recommended for validation and normalization of theme config. +[Joi](https://www.npmjs.com/package/joi) is recommended for validation and normalization of theme config. ::: -If you don't use **[Joi](https://www.npmjs.com/package/@hapi/joi)** for validation you can throw an Error in case of invalid options. +If you don't use **[Joi](https://www.npmjs.com/package/joi)** for validation you can throw an Error in case of invalid options. ```js {8-11} title="my-theme/src/index.js" module.exports = function (context, options) {