Skip to content

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