diff --git a/docs/3.x.x/en/guides/models.md b/docs/3.x.x/en/guides/models.md index 404a6c84aa..285710e845 100644 --- a/docs/3.x.x/en/guides/models.md +++ b/docs/3.x.x/en/guides/models.md @@ -33,6 +33,23 @@ The following types are currently available: - `json` - `email` +#### Validations + +You can apply basic validations to the attributes. The following supported validations are *only supported by MongoDB* connection. +If you're using SQL databases, you should use the native SQL constraints to apply them. + + - `required` (boolean) — if true adds a required validator for this property. + - `unique` (boolean) — whether to define a unique index on this property. + - `max` (integer) — checks if the value is greater than or equal to the given minimum. + - `min` (integer) — checks if the value is less than or equal to the given maximum. + + +**Security validations** +To improve the Developer eXperience when developing or using the administration panel, the framework enhances the attributes with these "security validations": + + - `private` (boolean) — if true, the attribute will be removed from the server response (it's useful to hide sensitive data). + - `configurable` (boolean) - if false, the attribute isn't configurable from the Content Type Builder plugin. + #### Example **Path —** `User.settings.json`. @@ -50,14 +67,23 @@ The following types are currently available: "lastname": { "type": "string" }, + "email": { + "type": "email", + "required": true, + "unique": true + }, "password": { - "type": "password" + "type": "password", + "required": true, + "private": true }, "about": { "type": "description" }, "age": { - "type": "integer" + "type": "integer", + "min": 18, + "max": 99 }, "birthday": { "type": "date" diff --git a/packages/strapi-admin/admin/src/components/InstallPluginPopup/styles.scss b/packages/strapi-admin/admin/src/components/InstallPluginPopup/styles.scss index a4030f8e47..823fbe22e1 100644 --- a/packages/strapi-admin/admin/src/components/InstallPluginPopup/styles.scss +++ b/packages/strapi-admin/admin/src/components/InstallPluginPopup/styles.scss @@ -71,7 +71,8 @@ flex-shrink: 0; width: 144px; height: 144px; - border: 1px solid #E8EEFC; + background: #FAFAFB; + border: 1px solid #F3F3F7; border-radius: 3px; background-size: contain; line-height: 144px; diff --git a/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js b/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js index a9e416dc1e..0070b068bd 100755 --- a/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js @@ -41,7 +41,7 @@ function LeftMenuLinkContainer({ plugins }) {

{pluginsSections[current].name}

@@ -79,12 +79,12 @@ function LeftMenuLinkContainer({ plugins }) {