Validation classes complited

This commit is contained in:
Lazypr0ger
2025-04-12 15:52:43 +04:00
parent 0688934faf
commit 6156a55dd9
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,7 @@

namespace UniversityAllExpelled_Models.Exceptions;
public class ValidationException(string message) : Exception(message)
{
}

View File

@@ -0,0 +1,15 @@

namespace UniversityAllExpelled_Models.Extensions;
public static class StringExtensions
{
public static bool IsEmpty(this string str)
{
return string.IsNullOrWhiteSpace(str);
}
public static bool IsGuid(this string str)
{
return Guid.TryParse(str, out _);
}
}

View File

@@ -0,0 +1,7 @@

namespace UniversityAllExpelled_Models.Infrostructure;
public interface IValidation
{
void Validate();
}