Version 24.2 (latest)

Validate Method (TimeSpanEditor)

Validates the specified text and returns a value specifying whether it is valid.
Syntax

Parameters

text
The string to evaluate.
formatInfo
The TimeSpanFormatInfo instance which provides formatting information.
minValue
The minimum allowable value.
maxValue
The maximum allowable value.
allowNull
Specifies whether a null value is permitted. When this parameter is true, passing an empty string as the text will pass validation.
errorMessage
[out] Upon return, contains the human-readable message describing the reason the value was determined to be invalid, or null if the value is valid.

Return Value

A TimeSpanEditorInvalidValueReason constant which describes the reason for the failed validation.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also