Skip to content
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

[Feature] Rule validation #2

Merged
merged 9 commits into from
Apr 11, 2020
Merged

[Feature] Rule validation #2

merged 9 commits into from
Apr 11, 2020

Conversation

luispfgarces
Copy link
Contributor

Adding validation logic to rules creation, ensuring a rule object creation follows a set of particular checks:

  • DateBegin is not default value
  • DateBegin and DateEnd are a valid interval
  • ContentContainer is defined
  • Name is defined
  • Priority greater than 0

Also, the rule conditions have some checks done on them. If composed condition:

  • Should have And or Or logical operators
  • It also performs validation on child conditions.
    If value condition:
  • Condition Type should be setted
  • Condition (when it an enum) should have a declared value
  • Data Type should have a declared value
  • Checks if Data Type is correct according to runtime type of operand
  • Operator should have a declared value
  • Operator can only be Equal and NotEqual on strings and booleans

@luispfgarces luispfgarces self-assigned this Apr 11, 2020
@luispfgarces luispfgarces merged commit 8d1cbd6 into master Apr 11, 2020
@luispfgarces luispfgarces deleted the feature/rule_validation branch June 6, 2021 14:43
luispfgarces added a commit that referenced this pull request Sep 1, 2024
luispfgarces added a commit that referenced this pull request Sep 24, 2024
* refactor!: create non-generic rules engine

* chore: change var style rules for C#

* feat!: add APIs to create content types

* chore: resolve codacy code analysis issues

* chore: resolve codacy code analysis issues #2
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.

1 participant