flagsmith
flagsmith copied to clipboard
Feature values -- schema and validations
When updating feature Values (remote config), it would be excellent to have a way to specify the allowable range of these values and validate the value input against that schema.
Would this just be for numeric values? Did you have a validation schema in mind?
Ideally it would be flexible. At least supporting different primitive types, maybe something like: integer, float, string, boolean.
Our current in-house config management utility uses a JSON schema -- so it can allow anything from primitive data types (with a specified range of valid values) to full json documents (with a specified document structure).
Something like JSON-Schema could do the trick. Perhaps the easiest way to implement this in the Flagsmith UI would be to add an optional "JSON Validation Schema" field alongside the value field, where the schema can just be pasted in.
Where a more involved way would be to build a UI that can generate the Schema.
So you would want to be able to validate primitive types as well as JSON documents?
That would be ideal, yup.
But even just primitive types would be a great start.
Closing in favour of https://github.com/Flagsmith/flagsmith/issues/3457