News Categories

RFP Answer Input Validation

Sometimes you want to restrict the type of information that can be input in response to your RFP questions. For example, you may wish to perform further analysis on answers input by respondents to your RFP:

  • Price information, and you wish to compare prices between respondents
  • Financial background information
  • Technical details about the product or service being sourced

Previously PostRFP text boxes were entirely free from - the user could input any information. A new feature recently added is Input Validation. When applied to a text input field, this checks the data input by a respondent conforms to a given "validation mask". The following masks are predefined:

  • Positive Integer or zero - e.g "23", "0", "342"
  • Integer - the data must be a whole number, positive or negative e.g. "89", "-5"
  • Float - a positive or negative number, optionally with decimal places eg. "34.2334", "34", "0.342

These masks can be set when designing a question.

There is drop down menu allowing one of the predefined masks to be chosen:

If the existing existing masks don't fit your requirements, it is possible to design your own by choosing "User Defined" from the menu. This is an advanced topic, introduced below, but you should always feel to contact us , in which case we'll often be able to provide the mask you need by return of email.

Advanced - User Defined Validation

For the technically inclined (or those with access to a techie), it is also possible to define your own validation mask using Regular Expressions. Regular Expressions are a very powerful programming tool for matching text patterns.They are not at all simple to use in more complex cases, but it's a good thing to ask your IT guys to help out with. For example, if you were asking a bank to take the time they take to settle transactions, you might wish to allow answer in the form: "3 days" or "36 hours" In this case, you want a rule saying: "Allow numbers (optionally decimal) followed by either 'day','days','hour' or 'hours'. ". A regular expression for this would look like: /^\d+(\.*\d*) (day|hour)s*$/ For example, if you wished to restrict an answer to one containing "yes", "no" or "maybe", you would write the following regular expression: /yes|no|maybe/i The pipe character "|" is translated as "or".  The forward slashes indicate the beginning and end of the expression. The trailing "i" character indicates that the search is case insensitive. This would allow answers such as "yes, in all cases" or "no, never". To allow only "Yes","No" or "maybe" answers the regular expression must define the beginning and end of the input: /^(yes|no|maybe)$/ "^" means the match starts from the beginning of the input, "$" means the end of the input. The allowed values are in brackets to indicate "allow any one of this group". To make the match case insensitive you can add the "i" flag: /yes|no|maybe/i