Skip to content

pkg simpleschema: CEL validation support #477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

DhairyaMajmudar
Copy link
Contributor

@DhairyaMajmudar DhairyaMajmudar commented Apr 2, 2025

Description

  1. Adds CEL validation support
  2. Adds test cases corresponding to the changes

fixes: #347

cc: @a-hilaly

{
name: "Schema with CEL validation - immutable filed",
obj: map[string]interface{}{
"immutableFoo": "string | validation={\"rule\": \"self == oldSelf\", \"message\": \"can't be changed\"}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that maybe we can also have a simpler support for validation, like name: string | validation="self.name != 'something'". And honestly i'm not really convinced that smashing jsons in the simple schema is a good thing, idk just sharing my thoughts :) - let's keep for now and see what other folks think.

@a-hilaly
Copy link
Member

a-hilaly commented Apr 7, 2025

Closing in favor of #484

@a-hilaly a-hilaly closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement SimpleSchema CEL validation support
2 participants