Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

One of frevvo's most powerful and useful features is its ability to automatically ensure that any submitted form generates a set of XML documents that are valid with respect to their corresponding XML schemas. does frevvo does this by:

Required Controls and Validation

 controls frevvo controls may be marked as required or optional by setting the control's required property in edit mode. Controls that are generated from an uploaded schema will automatically be designated as required or optional depending on the schema (for example, whether the control is required based on the minOccurs value). Validation for controls you generate from schema elements depends on the element’s XSD type and other schema-specific information.

...

Note that the Email Address and Phone controls are optional. The form may be submitted even though there are no values in these controls. However, if the user enters an invalid value in one of the fields (required or not), will frevvo will prevent form submission.

When a form has sections or tabs, the submission may not be allowed due to invalid controls that are not currently visible. For example, a section that is collapsed or a tab that is not currently selected may have an invalid control. This is indicated in the header section and tab label color changing to red.

...

Consider the scenario where there are several required fields in a form and the user clicks the submit button having missed a few of them.  will  frevvo will not allow the form to be submitted due to the empty required fields. The user must provide the information for these fields but it is not immediately obvious what data is missing. The user is forced to scroll up the form to find the errors.

provides frevvo provides a method to show validation errors at the time of submission. Here's how it works:

...

If the user changes his/her mind and removes the value from the Street field,  will  frevvo will recalculate the validity of the form and infer that the Address section is no longer invalid since it is optional. The generated XML instance document will also not contain an address element. Once again,  is  frevvo is automatically ensuring that it is not possible to submit a form that is in an invalid state and that would generate an invalid document.

...

Input Validation

Form fields added from frevvo's control palette have built-in validation rules.  The table below details the default validation for each control type in in frevvo's palette. Patterns added to a control change the defaults.

...

If a user clicks submit and any of the controls listed above fails validation, the controls will be highlighted with an orange color indicating that the form cannot be submitted. See above InvalidFormNotificationforUsers for other methods to notify users when forms are invalid.

...

Note
  • DO NOT use the typical leading ^ and trailing $ characters in your patterns. These two characters represent the beginning and end of line markers and do not apply to  form to frevvo form field values.
  • It is important to use a text control for most patterns. For example a zip code requires a '-' character. If a '-' is used in a number control the pattern will fail, as a number control does not allow non-numeric characters.

If a user enters a value in a field that does not match the required pattern, a validation error displays when the user tabs out of the field. If the user clicks Submit without correcting the invalid data, then the field will be highlighted with a background color and submission will not be allowed. See above InvalidFormNotificationforUsers for other methods to notify users when forms are invalid.

...

Code Block
([1-9]|[1-3][0-9]|4[0-2])

Numbers with commas

frevvo' default s default number control supports digits followed by an optional decimal point and multiple decimal places. Suppose instead you want to allow numbers containing commas and optionally starting with a '$' and only up to 2 decimal places. For example: $1,000.50 2,500. But also to allow numbers without the comma such as $1000. To do this:

...

An customized error message displays if the user enters more than the allowed number of decimal places and the control becomes invalid.

EMail pattern

If you use  Inuse frevvo In-house (downloaded and installed on your computer), you can change frevvo's built-in patterns for the Email control by editing the ''types.xsd'' file included in the <frevvo installdir>/tomcat/webapps/frevvo.war file. This file includes the email type definition shown below, and you can edit its pattern value. See the example in the phone pattern section below Phonepattern for instructions to modify the types.xsd file.

...

Lets say you would like to change the phone control validation from the the frevvo's current built-in pattern. Cloud customers must apply Patterns to a text control while in-house customers have two options

  1. Apply patterns to a control - Like other control properties, the pattern property will not need to be redone when you upgrade Image Added.
  2. Modify the built-in values in the types.xsd file. Be aware that if you modify the types.xsd file, you will have to make this change each time you perform a  upgrade or apply a  patch.

...

If you are using  Online, you will not have access to types.xsd. Both cloud and in-house customers, can override the pattern in the phone control by setting its pattern property. You can only restrict a built-in pattern (such as the phone control) but not change the pattern via the pattern property. For example you can add the pattern 203-\d{3}-\d{4}.  Now all phone numbers must start with area code 203.

Tip

The Pattern property will not need to be redone when you upgrade .

A pattern such as ##-####-#### or ####-###-### is not a simple restriction. To impose validation against this pattern you must start with a Text control rather than a Phone control

...

  1. Apply patterns to a control - Like other control properties, the pattern property will not need to be redone when you upgrade .
  2. Modify the built-in values in the types.xsd file. Be aware that if you modify the types.xsd file, you will have to make this change each time you perform a  upgrade or apply a  patch.

...

If you are using  Online, you will not have access to types.xsd. Both cloud and in-house customers, can override the pattern in the phone control by setting its pattern property. You can only restrict a built-in pattern (such as the phone control) but not change the pattern via the pattern property. For example you can add the pattern 203-\d{3}-\d{4}.  Now all phone numbers must start with area code 203.

Tip

The Pattern property will not need to be redone when you upgrade .

A pattern such as ##-####-#### or ####-###-### is not a simple restriction. To impose validation against this pattern you must start with a Text control rather than a Phone control

...

Modify the types.xsd file

frevvo OEM partners may choose this method when customizing .  The built-in values are shown in the image below:

...