Try our conversational search powered by Generative AI!

Validate setting-based property validation

Fixed in

EPiServer.CMS.Core 12.14.0

(Or a related package)

Created

Dec 28, 2022

Updated

Apr 18, 2023

Area

CMS Core

State

Closed, Acceptance tests pass


Description

Validators (such as LengthPropertyValidator) may be activated (if configured) to validate property data after content data is sent to the back-end, and the validators validate property in line with settings provided by developers (such as  LengthValidationSettings).

Several types of settings are handled by developers only and Optimizely stores them in the database without any validation, even though data could be wrong (such as maximum < minimum). To make validation consistent and valid, Optimizely handles the validation of validator settings before saving them.

  • Maximum and Minimum may not be null at the same time.
  • Maximum should be greater than Minimum
  • For RegularExpressionValidationSettings and ItemRegularExpressionValidationSettings, the pattern used in validation process may not be null or empty.

These rules apply to the following:

  • LengthValidationSettings
  • RangeDateValidationSettings
  • RangeFloatNumberValidationSettings
  • RangeNumberValidationSettings
  • ItemLengthValidationSettings
  • ItemRangeDateValidationSettings
  • ItemRangeFloatNumberValidationSettings
  • ItemRangeNumberValidationSettings