Try our conversational search powered by Generative AI!

RangeAttribute: error message is not handled

Found in

EPiServer.CMS.UI 11.17.0

Fixed in

EPiServer.CMS.UI 11.18.0

(Or a related package)

Created

Feb 07, 2019

Updated

Feb 25, 2019

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce:
1. Install alloy template with thess properties in the artical contenttype:

[Required(ErrorMessage ="This error message can be triggered if we want.")] 
[Display( 
Name = "Start date", 
Description = "Note: If input is given in a different timezone than the event, adjust time accordingly and output will be correct", 
GroupName = SystemTabNames.Content, 
Order = 6)] 
[Range(typeof(DateTime), "12/31/1999", "1/1/9999", ErrorMessage = "This error message is never triggered.")] 
public virtual DateTime EventStartDate { get; set; }

2. Go to edit mode
3. Wnter a date that is not in the range.

Expected:
"This error message is never triggered." message is displayed.

Actual:
Message appears "Something went wrong - This value is out of range".