Skip to main content

DateRangeAttribute.ErrorTextYearsPlaceholder Property

Gets or sets a value that specifies the text that will be displayed instead of the word ‘years’ in the editor’s error text.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public string ErrorTextYearsPlaceholder { get; set; }

Property Value

Type Description
String

A string value that specifies the text.

Remarks

Use the ErrorTextYearsPlaceholder property to specify the text that will be displayed instead of the word ‘years’ in the editor’s error texts: DateEditRangeSettings.MinErrorText, DateRangeAttribute.MinErrorText.

Default templates are:

  • “The date range must be greater than or equal to {0} {1}.”

    • {0} - Represents the number of days/month/years/decades.
    • {1} - Represents days/month/years/decades.
  • “The date range must be from {0} to {1} {2}”. ({2} represents days/month/years/decades)

    • {0} - Represents the minimum number of days/month/years/decades in the date range.
    • {1} - Represents the maximum number of days/month/years/decades in the date range.
    • {1} - Represents days/month/years/decades.

Note

The ErrorTextYearsPlaceholder property is in effect if the ASPxCalendar.PickerType/ASPxDateEdit.PickerType property is set to ‘Years’.

See Also