Table of Contents

Class Validator

Namespace
NuvTools.Validation.Annotations
Assembly
NuvTools.Validation.dll

Provides validation methods for objects decorated with data annotation attributes.

public static class Validator
Inheritance
Validator
Inherited Members

Methods

Validate<T>(T)

Validates an object using its data annotation attributes.

public static List<string>? Validate<T>(this T obj)

Parameters

obj T

The object to validate.

Returns

List<string>

A list of error messages if validation fails; otherwise, null if the object is valid.

Type Parameters

T

The type of the object to validate.

Exceptions

ArgumentNullException

Thrown when obj is null.