RaspberryIO/Unosquare.Swan.Lite/Abstractions/IValidator.cs
2019-12-04 17:10:06 +01:00

23 lines
552 B
C#

using System;
namespace Unosquare.Swan.Abstractions {
/// <summary>
/// A simple Validator interface.
/// </summary>
public interface IValidator {
/// <summary>
/// The error message.
/// </summary>
String ErrorMessage {
get;
}
/// <summary>
/// Checks if a value is valid.
/// </summary>
/// <typeparam name="T">The type.</typeparam>
/// <param name="value"> The value.</param>
/// <returns>True if it is valid.False if it is not.</returns>
Boolean IsValid<T>(T value);
}
}