MotorsportReg.com : click to return home
 

Contents

Validation Rules

Validation rules are a powerful way of checking for registration conditions and taking action. A broad selection of rules let you enforce specific rules and policies with great precision.

In general, validation rules are a more advanced feature most commonly used for:

  • Enforcing race compliance fees
  • Requiring valid membership or preventing non-members from registering
  • Checking race transponder is on file
  • Checking the vehicle make for marque-specific events
  • Taking action based on the number of packages ordered
  • Checking for valid answers to questions about age, dates or numbers

Validation rules can take one (or more) of the following actions:

  1. Show Error - display an error message and stop the registration
  2. Require - the target element must be selected/answered
  3. Unavailable - the target element may not be picked/answered

Require and Show Error account for nearly all of the actions used on forms.

Webinar

MORE AUTOMATION WITH VALIDATION RULES

  • Enforce specific rules and policies
  • Prevent attendee mistakes
  • Reduce time spent reviewing registrations
  • Useful for all kinds of events from socials to autocross to track days to club racing
Click here to view

We recorded a webinar just about validation rules with examples for nearly all event types. Become a pro and watch it now.

Identifying Validation Rules

Validation rules are identified on the form layout with a red push-pin icon as in the following screen shot:

For each validation rule, an additional push-pin will be displayed. It's perfectly reasonable and common to have more than one rule on an element. Assigners will often check for both a compliance fee and a transponder.

Adding Rules

To add a validation rule, first select any element in the form layout. In the right pane will appear the common form layout options plus a button at the bottom to "Add Rule".

Select the appropriate rule and, if required, enter a value into the adjacent field. For each rule, one or more actions may take place. It is most common to have one action per rule but there are scenarios where more than one action makes sense (like for a double race entry where a compliance fee for each race should be required).

Each action, added by clicking the "Add Action" button, is intended to read like an English sentence:

If <rule> is <true|false>, then <show an error|require something|make something unavailable>

Optionally, specify a custom error message and/or the element that is required. The "Require" and "Make Unavailable" actions will pop open a box to select a target element from the registration form.

Be sure to click save when you have made your changes. This also includes after deleting an action or rule.

Target Limitations

When selecting a target element for Require or Make Unavailable, the only limitation is that you may not create an endless loop by picking the same element for which you are creating the validation rule.

Rule Explanation

Validation rules generally take action based upon the value of the element they are attached to. Here's the value we check for each type:

  • Packages - the quantity selected (numeric)
  • Question - the answer entered (0/1, text string, number, money or date)
  • Assigner - must specifically validate against the class, modifier, group or vehicle
  • Co-Driver Picker - empty or blank
  • Groups - no value to validate against
  • Branches - 0 = unchecked, 1 = checked
  • Text Blocks - no value and cannot be used with validation rules

Certain rules, like "Membership is valid", are not type-specific and so can be attached to nearly any item in the form layout. Others, like "Class In List" only make sense in the context of an Assigner which collects vehicle class.

Current Rules

  • Class is in list
    1. e.g. Require spec tire/fuel purchases (karting)
    2. e.g. Require compliance fees (racing)
    3. e.g. Show error if not a valid class (racing)
  • Group is in list
    1. e.g. Require novice run group to pay for an instructor
    2. e.g. Require volunteers to answer a task/specialty question
    3. e.g. Show error when one group is full w/o inventory limits
  • Transponder number is valid
    1. e.g. Require a rental transponder
    2. e.g. Show error until vehicle profile is updated
  • Modifier is in list
    1. e.g. Require additional fee for double-point classification
  • Modifier is empty
    1. e.g. Force selection of a class modifier/PAX
  • Class is selected + Modifier is not in mapping list
    1. e.g. Limit which modifiers/PAX are allowed for specific classes
    2. e.g. SS1:S1,S2,S3,S4 - Class SS1 requires Modifier/PAX S1-S4
    3. e.g. N,P:* - require Novice/Pro to pick a class modifier/PAX
  • Class in list does not allow a Modifier
    1. e.g. P,S,T,N - if false, show error to force selecting a modifier/PAX
    2. e.g. SS,AS,BS,CS... - if true, show error to prevent selecting a modifier/PAX
  • Vehicle make is in list
    1. e.g. Show error if car is not a valid marque (e.g., Porsche only)
  • Vehicle model is in list
    1. e.g. Show error if model is not valid (e.g., 911 only)

  • Vehicle year is in list
    1. e.g. Show error if year is not valid (car shows, concours)
    2. e.g. Require inspection fee if vehicle is certain age
  • Vehicle color is empty
    1. e.g. Show error until vehicle profile is updated with color
  • Engine displacement is empty
    1. e.g. Show error until vehicle profile is updated with engine displacement
  • Log book number is empty
    1. e.g. Show error until vehicle profile is updated with logbook number
  • Official weight is empty
    1. e.g. Show error until vehicle profile is updated with official weight
  • GCR/CCR/Rules page number is empty
    1. e.g. Show error until vehicle profile is updated with rulebook page number
  • Tire brand is empty
    1. e.g. Show error until vehicle profile is updated with tire brand
  • Front/Rear Track is empty
    1. e.g. Show error until vehicle profile is updated with front/rear track
  • VIN number is empty
    1. e.g. Show error until vehicle profile is updated with VIN
  • Membership is valid during registration
    1. e.g. Show error to non-members as of today
    2. e.g. Require non-members to buy a membership
    3. e.g. Require valid members to choose a discounted fee
  • Membership in local chapter/region/club is valid during registration
    1. e.g. Check membership in region/chapter as of today
    2. e.g. Give local members early access to register
  • Membership is valid at start of event
    1. e.g. Show error to non-members as of the event start date
  • Membership is valid in local chapter/region/club at start of event
    1. e.g. Check membership in region/chapter as of the event start date
  • License in list validates (specified as program:type)
    1. e.g. Verify competition and specialty licenses (SCCA-specific)
  • Value is empty
    1. e.g. Prevent another selection when a field is left blank
    2. e.g. Require another question/fee if field is not blank
  • Value is in list (case-insensitive)
    1. e.g. Show error if invalid secret answer/promo code is entered
    2. e.g. Make special options unavailable without a valid answer
  • Value is equal to this number
    1. e.g. Require answer to a question based on package quantity
    2. e.g. Force acknowledgement of yes/no questions
  • Value is greater than this number
    1. e.g. Require or show error when numerical answer is greater than value
  • Value is less than this number
    1. e.g. Require or show error when numerical answer is less than value
  • Length is equal to this number
    1. e.g. Show error when answer length is equal to this number of characters
  • Length is greater than this number
    1. e.g. Show error when answer length is greater than this number of characters
  • Length is less than this number
    1. e.g. Show error when answer length is less than this number of characters
  • Value matches the regular expression [ADVANCED]
    1. e.g. Show error if answer does not pass complex validation

Autocross/Solo Indexed Class Validation

Autocross/Solo groups frequently use class modifiers to support indexed classes and PAX/RTP competition. We offer specialized support through two Modifier-related rules:

The first rule above is Class is selected + Modifier is not in mapping list. This allows you to specify one or more classes followed by one or more modifiers that must be provided to satisfy the rule. Some examples:

  • "P:*" would require any modifier/PAX for the "P" (Pro) class. The asterisk is a special character meaning "any". Only an empty value will fail this rule.
  • "P:AS,BS,CS" would require a modifier/PAX of AS, BS or CS if the attendee selects the "P" (Pro) class. Any other value, including an empty value, will fail this rule.
  • "N,L:AS,BS,CS,DS" would require Novice and Ladies classes to select a modifier of AS, BS, CS or DS. Any other value, including an empty value, will fail this rule.

The second rule above is Class in list does not allow a Modifier. This restricts certain classes from selecting a modifier/PAX for when it is not allowed. Some examples:

  • "AS,BS,CS,DS" would prevent attendees who choose AS, BS, CS or DS as their class from choosing any modifier. This can be used to prevent non-indexed classes from choosing an index.

Finally, a third rule (not shown above) is Modifier is empty. This rule lets you require the attendee selects a modifier for a given assigner.

More Examples

For more examples of validation rules in action, take a look at our Event Recipes which give real-world uses for each type.

Missing Targets

It is possible (but rare) for a validation rule (either Require or Make Unavailable) to be created without selecting an element to act against (the "target"). When this happens, the registration form will display a message like:

There is a configuration problem with this form that requires the attention of the registrar. 'Registration Fee' has a validation rule with an invalid target for a 'Require' action. See http://www.MotorsportReg.com/help/kb/FormValidations for documentation. The registrar must select a target or remove this validation rule.

To correct this, open the Form Builder and look at the validation rules (the red push pins), and you will find one with either a "Require" or "Make Unavailable" action, which does not have the target picked. Click the "pick" button like in this screenshot:

That will open a small window allowing you to select which form element should be enforced by the rule. Save it and your form will be good to go.

If you do have one of these, we recommend checking all of your validation rules in case this same issue exists elsewhere.

tags Explore related help by tag: Admin, Premium, Registrar, SCCA