Skip to main content

Constraint Types

Use constraints to limit the data that can be entered in a field. The available constraint types depend on the data type of the selected field. Different constraints are available depending on whether the field is a text field, a numeric field, or a date field. For information about adding a constraint to a field, see Add a Constraint to a Field.

Constraints for Text Fields

The following types of constraints can be set on text fields in Flexmls.

Table 1. Text Fields: Common Constraints

Constraint

Description

Disallow HTML

Prevent HTML tags from being entered into the selected field.

Disallow Terms

Enter a comma-separated list of words to block from the selected field (200-character maximum). Terms are case-insensitive; the entered terms will be blocked regardless of capitalization.

Disallow Characters

Prevent special characters from being entered into the selected field. Characters will be disallowed regardless of whether they contain spaces on both or either side of the character. For example, if you are disallowing the % character, both 2.7% and 2.7 % will be disallowed.

Minimum text length

Set the minimum number of characters that can be entered in the selected field.

Maximum text length

Set the maximum number of characters that can be entered in the selected field.

Disallow phone numbers

Prevent phone numbers from being entered into the selected field.

Note

The constraint accounts for the most common formatting of phone numbers. It may not prevent all cases.

Number in dollars or percent ($/%)

Allow only numbers in the field, with either a dollar sign ($) or percent symbol (%).

If letters are entered in the field, they will be stripped out automatically.

Only numbers can be entered

Allow only numbers to be entered in the selected field.

Only alphanumeric can be entered

Allow only letters and numbers to be entered in the selected field.



Table 2. Text Fields: Advanced Constraints

Constraint

Description

Lock field on date

Lock the selected field on the date in a related field. When the date has passed, the selected field becomes read-only and cannot be changed.

The number in the Grace Period field determines exactly when the field is locked. By default, the grace period is 0, which means that the restriction takes effect at 12 a.m. on the specified date. To allow members to edit the field on the specified date, set the grace period to 1. Enter a number larger than 1 if the field should be editable for a set number of days after the specified date.



Constraints for Numeric Fields

The following types of constraints can be set on numeric fields in Flexmls.

Table 3. Numeric Fields: Common Constraints

Constraint

Description

Max percent increase

Set the maximum increase (by percentage) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Examples:

  • If the List Price cannot be increased by more than 20%, add a constraint to the List Price field with a maximum percent increase of 20.

  • If the Sold Price can be no more than 20% greater than the List Price, add a constraint to the Sold Price field with a maximum percent increase of 20 and a related field of List Price.

Max percent decrease

Set the maximum decrease (by percentage) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Examples:

  • If the List Price cannot be decreased by more than 20%, add a constraint to the List Price field with a maximum percent decrease of 20.

  • If the Sold Price can be no more than 20% lower than the List Price, add a constraint to the Sold Price field with a maximum percent decrease of 20 and a related field of List Price.

Min value

Set the minimum value that can be entered in the selected field.

Max value

Set the maximum value that can be entered in the selected field.



Table 4. Numeric Fields: Advanced Constraints

Constraint

Description

Max value increase

Set the maximum increase (by value) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Max value decrease

Set the maximum decrease (by value) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Min value increase

Set the minimum increase (by value) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Example:

  • If the List Price must be increased by at least $10,000, add a constraint to the List Price field with a minimum value increase of 10000.

Min value decrease

Set the minimum decrease (by value) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Example:

  • If the List Price must be decreased by at least $10,000, add a constraint to the List Price field with a minimum value decrease of 10000.

Larger only

If the value in the field is changed, it must be larger than the existing value. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Larger or equal only

If the value in the field is changed, it must be equal to or larger than the existing value. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Smaller only

If the value in the field is changed, it must be smaller than the existing value. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Smaller or equal only

If the value in the field is changed, it must be equal to or smaller than the existing value. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Disallow Terms

Enter a comma-separated list of words to block from the selected field (200-character maximum). Terms are case-insensitive; the entered terms will be blocked regardless of capitalization.

Min entry length

Set the minimum number of characters that can be entered in the selected field.

Max entry length

Set the maximum number of characters that can be entered in the selected field.

Lock field on date

Lock the selected field on the date in a related field. When the date has passed, the selected field becomes read-only and cannot be changed.

The number in the Grace Period field determines exactly when the field is locked. By default, the grace period is 0, which means that the restriction takes effect at 12 a.m. on the specified date. To allow members to edit the field on the specified date, set the grace period to 1. Enter a number larger than 1 if the field should be editable for a set number of days after the specified date.

Require entry of one decimal

Require the selected field to contain one decimal place (for example, 397.0).

Require entry of two decimals

Require the selected field to contain two decimal places (for example, 397.00).

Disallow entry of decimal

Prevent decimals from being entered in the selected field. The data must contain whole numbers only.

Min percent increase

Set the minimum increase (by percentage) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Example:

  • If the List Price must be increased by at least 10%, add a constraint to the List Price field with a minimum percent increase of 10.

Min percent decrease

Set the minimum decrease (by percentage) for the selected field. The constraint can be relative to the previous value in the same field or relative to the value in another field.

Example:

  • If the List Price must be decreased by at least 10%, add a constraint to the List Price field with a minimum percent increase of 10.



Constraints for Date Fields

The following types of constraints can be set on date fields in Flexmls.

Table 5. Date Fields: Common Constraints

Constraint

Description

Min value

Set the earliest date that can be entered in the selected field. Enter a date in MM/DD/YYYY format.

Max value

Set the latest date that can be entered in the selected field. Enter a date in MM/DD/YYYY format.

Min days before

Restrict the date in the selected field to a minimum number of days before another date. The constraint can be relative to the current date or relative to the date in another field. If you do not select a related field, the current date will be used.

Example:

  • If the Under Contract Date must be at least 3 days before the Closed Date, add a constraint to the Under Contract Date field. Set Min days before to 3 and select a related field of Closed Date.

Min days after

Restrict the date in the selected field to a minimum number of days after another date. The constraint can be relative to the current date or relative to the date in another field. If you do not select a related field, the current date will be used.

Examples:

  • If the Under Contract Date must be at least 3 days after the List Date, add a constraint to the Under Contract Date field. Set Min days after to 3 and select a related field of List Date.

  • If the Start Showing Date must be at least 3 days after the current date, add a constraint to the Start Showing Date field and set Min days after to 3.

Max days before

Restrict the date in the selected field to a maximum number of days before another date. The constraint can be relative to the current date or relative to the date in another field. If you do not select a related field, the current date will be used.

Examples:

  • If the Under Contract Date must be no more than 7 days before the Closed Date, add a constraint to the Under Contract Date field. Set Max days before to 7 and select a related field of Closed Date.

  • If the Start Showing Date must be no more than 7 days before the current date, add a constraint to the Start Showing Date field and set Max days before to 7.

Max days after

Restrict the date in the selected field to a maximum number of days after another date. The constraint can be relative to the current date or relative to the date in another field. If you do not select a related field, the current date will be used.

Examples:

  • If the Start Showing Date must be no more than 10 days after the List Date, add a constraint to the Start Showing Date field. Set Max days after to 10 and select a related field of List Date.

  • If the Start Showing Date must be no more than 10 days after the current date, add a constraint to the Start Showing Date field and set Max days after to 10.

Min business days before

Restrict the date in the selected field to a minimum of one day from the list date. This constraint does not account for weekends and federal holidays.

Min business days after

Restrict the date in the selected field to a maximum number of business days after another date. This constraint does not account for weekends and federal holidays.

Max business days before

Restrict the date in the selected field to a maximum of one business day after current date. This constraint does not account for weekends and federal holidays.

Max business days after

Restrict the date in the selected field to a maximum number of business days after another date. This constraint does not account for weekends and federal holidays.



Table 6. Date Fields: Advanced Constraints

Constraint

Description

Max value increase

Set the maximum number of days that the selected date can be increased by.

Max value decrease

Set the maximum number of days that the selected date can be decreased by.

Min value increase

Set the minimum number of days that the selected date can be increased by.

Min value decrease

Set the minimum number of days that the selected date can be decreased by.

Larger only

If the date in the field is changed, it must be later than the existing date. The constraint can be relative to the previous date in the same field or relative to the date in another field.

Examples:

  • If the Expiration Date must be later than the List Date, add the constraint to the Expiration Date field and select a related field of List Date.

  • If the Expiration Date can be made later, but not earlier, add the constraint to the Expiration Date field and do not select a related field.

Larger or equal only

If the date in the field is changed, it must be equal to or later than the existing date. The constraint can be relative to the previous date in the same field or relative to the date in another field.

Example:

  • If the Expiration Date must be equal to or later than the List Date, add the constraint to the Expiration Date field and select a related field of List Date.

Smaller only

If the date in the field is changed, it must be earlier than the existing date. The constraint can be relative to the previous date in the same field or relative to the date in another field.

Examples:

  • If the Under Contract Date must be earlier than the Estimated Close Date, add the constraint to the Under Contract Date field and select a related field of Estimated Close Date.

  • If the Under Contract Date can be made earlier, but not later, add the constraint to the Under Contract Date field and do not select a related field.

Smaller or equal only

If the date in the field is changed, it must be equal to or earlier than the existing date. The constraint can be relative to the previous date in the same field or relative to the date in another field.

Example:

  • If the Under Contract Date must be earlier than or equal to the Estimated Close Date, add the constraint to the Under Contract Date field and select a related field of Estimated Close Date.

Disallow Terms

Enter a comma-separated list of words to block from the selected field (200-character maximum). Terms are case-insensitive; the entered terms will be blocked regardless of capitalization.

Min entry length

Set the minimum number of characters that can be entered in the selected field.

Max entry length

Set the maximum number of characters that can be entered in the selected field.

Lock field on date

Lock the selected field on the date in a related field. When the date has passed, the selected field becomes read-only and cannot be changed. If you do not select a related field, the date in the selected field is used.

The number in the Grace Period field determines exactly when the field is locked. By default, the grace period is 0, which means that the restriction takes effect at 12 a.m. on the specified date. To allow members to edit the field on the specified date, set the grace period to 1. Enter a number larger than 1 if the field should be editable for a set number of days after the specified date.

Example:

  • If the Start Showing Date cannot be changed after the date in the field has passed, add the constraint to the Start Showing Date field and do not select a related field.