Flagsmith / flagsmith

Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/
https://flagsmith.com/
BSD 3-Clause "New" or "Revised" License
4.87k stars 372 forks source link

Feature Value Validation Settings #3457

Open graytonio opened 8 months ago

graytonio commented 8 months ago

Is your feature request related to a problem? Please describe.

We want to be able to give control of changing features and values over to external teams that may or may not have knowledge of the exact format a feature value needs to be in to work correctly. While some of this can be accomplished through change management what we would like to have is at a feature level some way of validating that the value, either as a variant, the default, or a segment/identity override matches certain conditions like matching a regex or being valid yaml/json.

Describe the solution you'd like.

Some setting on a feature that would allow us to input a regex field that is used to validate any feature value input and will not update if it does not pass. I would also like to have some setting that requires the value to be valid yaml/json if possible.

Describe alternatives you've considered

Manual review with change requests can cover some of this ground but having automation that allow us to be more confident in reviewing the changes is always nice.

Additional context

No response

dabeeeenster commented 8 months ago

Hey @graytonio - thanks for the suggestion - it's a good idea! Do you have a list of what you would want to validate against?

others?

graytonio commented 8 months ago

I think for valid formats being able to support each of the front end validation settings json, toml, yaml, xml would be a good range as well as a regex field should cover most of our bases pretty well.

khvn26 commented 8 months ago

Thanks for your feedback @graytonio! Do you think you'd benefit from JSON Schema validation too?

graytonio commented 8 months ago

I think that would be a great addition! for our usecases we would want to be able validate both json and yaml which I believe the json schema should allow us to do at least on a technical level.

rfriend-zilo commented 8 months ago

+1 for json schema validation