Show / Hide Table of Contents

Class RegexValidator

Represents a validator that validates a field value to conform to a certain regular expression.

Inheritance
System.Object
RegexValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace:Contentful.Core.Models.Management
Assembly:cs.temp.dll.dll
Syntax
public class RegexValidator : IFieldValidator

Constructors

RegexValidator(String, String, String)

Initializes a new instance of RegexValidator.

Declaration
public RegexValidator(string expression, string flags, string message = null)
Parameters
Type Name Description
System.String expression

The regular expression to validate against.

System.String flags

The flags to apply to the regular expression.

System.String message

The custom error message for this validation.

Properties

Expression

The expression to use.

Declaration
public string Expression { get; set; }
Property Value
Type Description
System.String

Flags

The flags to apply to the regular expression.

Declaration
public string Flags { get; set; }
Property Value
Type Description
System.String

Message

The custom error message that should be displayed.

Declaration
public string Message { get; set; }
Property Value
Type Description
System.String

Methods

CreateValidator()

Creates a representation of this validator that can be easily serialized.

Declaration
public object CreateValidator()
Returns
Type Description
System.Object

The object to serialize.

Implements
IFieldValidator.CreateValidator()
Back to top Copyright © 2015-2016 Contentful
Generated by DocFX