Closed rpundlik closed 8 years ago
Hi @rpundlik
I have a working example now for the Box.cs class
[Required(ErrorMessage = "BoxLengthRequired")]
[Range(1.0, 100.0, ErrorMessage = "BoxLengthRange")]
public double Length { get; set; }
The SQL localization records are in the sqlite file. This can be tested using an invalid POST request.
http://localhost:5000/api/boxes?culture=it-CH
User-Agent: Fiddler
Host: localhost:5000
Content-Length: 46
Content-Type: application/json
{ "Id":7,"Height":10,"Width":10,"Length":1000}
Let me know if you require anything else. Sorry for the slow answer, was busy ...
Greetings Damien
Hello, Thanks for the great project.
However, can you please tell how can we do localization of data annotations using SQL. I have written custom attribute for each of the validation(Like required,compare etc) and I want to implement localization logic in it.
Thanks for the help !