Table of Contents

Class FieldValidationResult

Namespace
CMS.FormEngine.Validation
Assembly
CMS.FormEngine.dll

Represents field validation result which may be valid or invalid.

public sealed class FieldValidationResult
Inheritance
object
FieldValidationResult
Extension Methods

Constructors

FieldValidationResult()

Initializes a new instance of FieldValidationResult.

public FieldValidationResult()

Remarks

Initialized instance is valid.

FieldValidationResult(string, string, params string[])

Initializes a new instance of FieldValidationResult.

public FieldValidationResult(string fieldName, string resourceKey, params string[] arguments)

Parameters

fieldName string

Name of field containing validation error.

resourceKey string

Resource key to be used in error message..

arguments string[]

Arguments to format resource key.

FieldValidationResult(string, params string[])

Initializes a new instance of FieldValidationResult.

public FieldValidationResult(string resourceKey, params string[] arguments)

Parameters

resourceKey string

Resource key to be used in error message..

arguments string[]

Arguments to format resource key.

Properties

FieldName

Gets name of invalid field. Can be null in case that generic error occurred.

public string FieldName { get; }

Property Value

string

IsValid

Indicates whether entire result is valid or not.

public bool IsValid { get; }

Property Value

bool

ResourceArguments

Gets error message resource formatting arguments. Array might be empty in case that formatting is not needed.

public string[] ResourceArguments { get; }

Property Value

string[]

ResourceKey

Gets error message resource key.

public string ResourceKey { get; }

Property Value

string