RaspberryIO_26/Swan.Lite/Validators/IValidator.cs
2019-12-04 18:57:18 +01:00

21 lines
561 B
C#

namespace Swan.Validators
{
/// <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>
bool IsValid<T>(T value);
}
}