Wiredcraft / jekyllpro-cms

A lightweight CMS for Jekyll websites.
http://jekyllpro.com/#cms
MIT License
7 stars 2 forks source link

Bug: validate `"format": "uri"` field even if it is not required #43

Closed woodpig07 closed 6 years ago

woodpig07 commented 7 years ago

Reported by @samcheah

      "cta": {
        "type": "string",
        "title": "Actions",
        "format": "uri"
      },

For a non-required field defined as above, user cannot submit the file if leave the field empty as it got validation error does not conform to the "uri" format

JuhaS commented 7 years ago

@haishanh It seems the problem here was with the library that we use that doesn't support empty value for type=URI even if it is not marked as required. We should check if there is way to fix this easily (maybe send undefined instead of "" if empty or similar) or if we should use another type for this.

woodpig07 commented 6 years ago

not relevant anymore