Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 534609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:37:50+00:00 2026-05-13T09:37:50+00:00

I’m curious about this: In Microsofts Outlook Express (or Outlook, don’t remember well, I’m

  • 0

I’m curious about this:

In Microsofts Outlook Express (or Outlook, don’t remember well, I’m a Mac user), they have something really cool. Generic rules:

You can configure a set of rules to automatically sort or delete your emails, for instance. It’s incredible powerful and easy to use.

These rules looked pretty much like this:

“If email in inbox has subject which contains ‘foo’, or ‘bar’, or ‘foobar’ delete it”

I need to code something similar for a powerful form validation system.
The developer should simply be able to create rules like this:

rule: [password_1] is_not_equal_with [password_2]
consequence: show_error '2921'

rule: [firstName] has_less_characters_than '2'
consequence: show_error '1211'

rule: [age] is_numeric, is_smaller_than '13', is_greater_than '130'
consequence: show_error '1522'

rule: [gender] is_equal_with 'female'
consequence: show_group [female_questions]

rule: [termsAndConditionsAccepted] is_not_checked
consequence: show_error '482'

rule: [age] is_less_than 21
consequence: hide_group [income_questions]

Well, I have some ideas how this could be done, and I will post them here as answer. But before I reinvent the wheel: Are there any written concepts I can use as foundation to develop a rule-based validation system similar to this? Or if not, do you have any suggestions how this could be done?

In the example above, everything in square brackets is the name of an html form element. Everything in apostrophs ” is a “hard coded” value to compare against.

The defined rules are translated into PHP code AND JavaScript code to do both client- and server side validation.

Features this must be capable of:

  • Conditional rules: Something A depends on something B
  • Value comparisons: For integers, floats, strings
  • Enable some form control logic as well, like in the “[gender] is_equal_with ‘female'” example above.

How could this be done? What are the entities I must consider, from a scientific point of view?

I think the theoretical concept of this is platform independent. Although I will implement this in PHP and JavaScript, there’s no reason why a C++ dev should not respond 😉
(I’m an Objective-C guy, btw)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:37:50+00:00Added an answer on May 13, 2026 at 9:37 am

    You might want to check out some of the opensource rules engines; or even a paid for one.

    Examples include
    Pay for it:
    InRule, Business Rules Engine, ASA Business Rules Engine

    Opensource:
    OpenRules, Drools

    There are a lot more. Including some built in to java (Java Rule Engine API (JSR94)), and .Net (Windows Workflow Foundation Rules Engine).

    Not sure about straight PHP though.

    As a side note, I’ve used a couple engines, like Haley Rules (before they were bought by Oracle) to drive web UI’s. Be aware that execution speed is absolutely critical. We had Haley processing about 2000 rules per page load (mortgage app), and it was executing in under 40 ms (not a typo). We used it to decide what fields were on the page as well as determine whether the entered data was consistent, met legal standards, and even whether it was entered correctly.

    Some of the other engines were much much slower even on much smaller rule sets due to how long it took to simply instantiate the engines.

    I’ve also gone down the path of writing my own for smaller systems. In my case I used javascript and simply set up variables with data from the posted page prior to executing the scripts that were saved with the forms.

    This was also performant on a smaller scale, but I limited it to only giving simple go / no go responses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.