Under Review
over 8 years ago

Enhance Validation Logic to allow AND's and OR's

Currently there is no easy way to mix "AND's" and "OR's", yet a typical validation logic for us is something like "if the computer is in room 1 OR 2 OR 3 AND the file does not exist, then install"

If there was a way to nest the AND's and OR's or logically group them it would make life easier (currently we have to do either a rule for each room (i.e. if room1 and file does not exist, if room 2 and file does not exist, etc.) or we have to nest them (i.e. outer element is "if room 1 or 2 or 3) and inner element is "if file does not exist)

Parents
  • To enhance validation logic by incorporating both AND and OR conditions, you can design your system to evaluate complex criteria with greater flexibility and precision.

    By allowing AND conditions, the validation logic ensures that multiple criteria must all be met for a validation to pass. For example, if you are validating user input, you might require that a username is both unique and meets a minimum length requirement for tooth gems and grillz. The validation will only succeed if both conditions are true.

    Conversely, OR conditions provide the flexibility to pass validation if at least one of multiple criteria is met. For instance, a form might accept either an email address or a phone number as a valid contact method. If the user provides at least one of these, the validation is considered successful.

Comment
  • To enhance validation logic by incorporating both AND and OR conditions, you can design your system to evaluate complex criteria with greater flexibility and precision.

    By allowing AND conditions, the validation logic ensures that multiple criteria must all be met for a validation to pass. For example, if you are validating user input, you might require that a username is both unique and meets a minimum length requirement for tooth gems and grillz. The validation will only succeed if both conditions are true.

    Conversely, OR conditions provide the flexibility to pass validation if at least one of multiple criteria is met. For instance, a form might accept either an email address or a phone number as a valid contact method. If the user provides at least one of these, the validation is considered successful.

Children
No Data