20250420
This commit is contained in:
41
anbs_cpfn/Constants/ValidationMessagesConstants.cs
Normal file
41
anbs_cpfn/Constants/ValidationMessagesConstants.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using anbs_cp.Classes;
|
||||
|
||||
namespace anbs_cp.ForNet.Constants;
|
||||
|
||||
/// <summary>
|
||||
/// Сообщения валидации
|
||||
/// </summary>
|
||||
public static class ValidationMessagesConstants
|
||||
{
|
||||
/// <summary>
|
||||
/// Сообщения на русском языке
|
||||
/// </summary>
|
||||
public static readonly KeyValueOrderedList<string> Russian =
|
||||
[
|
||||
new("RequiredAttribute", "Поле '{0}' обязательно к заполнению."),
|
||||
new("MinLengthAttribute", "Минимальная длина поля '{0}' от {1} символа(-ов)."),
|
||||
new("MaxLengthAttribute", "Максимальная длина поля '{0}' до {1} символа(-ов)."),
|
||||
new("EmailAddressAttribute", "Адрес email некорректен."),
|
||||
new("RangeAttribute", "Значение поля '{0}' должно быть между {1} и {2}."),
|
||||
new("CompareAttribute", "Значение поля '{0}' не совпадаем с требуемым."),
|
||||
new("RegularExpressionAttribute", "Значение поля '{0}' не удовлетворяет шаблону."),
|
||||
new ("PhoneAttribute", "Значение поля '{0}' не является номером телефона."),
|
||||
new ("CreditCardAttribute", "Значение поля '{0}' не является номером кредитной карты.")
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Сообщения на английском языке
|
||||
/// </summary>
|
||||
public static readonly KeyValueOrderedList<string> English =
|
||||
[
|
||||
new("RequiredAttribute", "You must fill in '{0}'."),
|
||||
new("MinLengthAttribute", "Min length of '{0}' is {1}."),
|
||||
new("MaxLengthAttribute", "Max length of '{0}' is {1}."),
|
||||
new("EmailAddressAttribute", "Invalid email address."),
|
||||
new("RangeAttribute", "The value of the field '{0}' must be between {1} and {2}."),
|
||||
new("CompareAttribute", "Unmatched field '{0}' value."),
|
||||
new("RegularExpressionAttribute", "Invalid field '{0}' value."),
|
||||
new ("PhoneAttribute", "The value of the field '{0}' is not valid phone number."),
|
||||
new ("CreditCardAttribute", "The value of the field '{0}' is not valid credit card number.")
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user