flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

Feature Value Validation Settings

Open graytonio opened this issue 1 year ago • 5 comments

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

graytonio avatar Feb 23 '24 14:02 graytonio

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

  • regex pattern
  • valid json
  • valid yaml
  • valid XML?

others?

dabeeeenster avatar Feb 23 '24 15:02 dabeeeenster

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.

graytonio avatar Feb 23 '24 15:02 graytonio

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

khvn26 avatar Feb 23 '24 16:02 khvn26

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.

graytonio avatar Feb 23 '24 16:02 graytonio

+1 for json schema validation

rfriend-zilo avatar Feb 26 '24 14:02 rfriend-zilo