plentico / plenti

Static Site Generator with Go backend and Svelte frontend
https://plenti.co
Apache License 2.0
985 stars 50 forks source link

Required fields #325

Closed jimafisk closed 1 month ago

jimafisk commented 1 month ago

We should have a schema option to allow making fields required. This should at least be available to text fields:

{
  "my_text_field": {
    "type": "text",
    "options": [
      "required"
    ]
  }
}

This would just be clientside, and the easiest thing to do would probably be to just disable the "Save" button and maybe add a tooltip that says "Must fill out all required fields" if there are required fields that are left blank. If we wanted to be more sophisticated, we could check this right before trying to publish and return errors.

jimafisk commented 1 month ago

This is available in v0.6.47