2020-09-07 22:46:50 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace AntDesign.Form.Locale
|
|
|
|
|
{
|
|
|
|
|
public class FormLocale
|
|
|
|
|
{
|
|
|
|
|
public DefaultValidateMessages DefaultValidateMessages { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class DefaultValidateMessages
|
|
|
|
|
{
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public string Default { get; set; } = "Field validation error ${label}";
|
|
|
|
|
public string Required { get; set; } = "Please enter ${label}";
|
|
|
|
|
public string Enum { get; set; } = "${label} must be one of [${enum}]";
|
|
|
|
|
public string Whitespace { get; set; } = "${label} cannot be a blank character";
|
|
|
|
|
public DateLocale Date { get; set; } = new();
|
|
|
|
|
public TypesLocale Types { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class DateLocale
|
|
|
|
|
{
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public string Format { get; set; } = "${label} date format is invalid";
|
|
|
|
|
public string Parse { get; set; } = "${label} cannot be converted to a date";
|
|
|
|
|
public string Invalid { get; set; } = "${label} is an invalid date";
|
2020-09-07 22:46:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class TypesLocale
|
|
|
|
|
{
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public string String { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Method { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Array { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Object { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Number { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Date { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Boolean { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Integer { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Float { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Regexp { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Email { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Url { get; set; } = "${label} is not a valid ${type}";
|
|
|
|
|
public string Hex { get; set; } = "${label} is not a valid ${type}";
|
2020-09-07 22:46:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|