keystonejs / keystone-classic

Node.js CMS and web app framework
http://v4.keystonejs.com
MIT License
14.64k stars 2.21k forks source link

Types.CloudinaryImage fields not affected by the required option #4971

Open eyrewiut opened 4 years ago

eyrewiut commented 4 years ago

Expected behavior

The Types.CloudinaryImage field type should be effected by the required: true option so users cant create new records without uploading a cloudinary image

Actual/Current behavior

No matter what I do I can't get the keystone to require a CloudinaryImage before creating or updating a record

Steps to reproduce the actual/current behavior

Create a model with a CloudinaryImage field and set the required option to true: image: { type: Types.CloudinaryImage, required: true, initial: true }

Environment

The model I am trying to create is for a blog and the project has been coded from scratch rather than using the generator, however, the issue is still present in projects that were created via the generator

Software Version
Keystone 4.2.1
Node.js 10.16.3
Browser Tested in Firefox, Chrome, Safari