Project maintenance: investigate how to change built-in validation messages

Issue #24 resolved
Daníel Sigurgeirsson created an issue

Currently, if we use the following when validating input:

public class SomeViewModel
{
    [Required]
    public string Message { get; set; }
    // Etc., more properties with validation attributes
}

// Then, inside some service provider:
public void AddSomeStuff(SomeViewModel model)
{
    CentrisValidation.Validate(model);
}

The CentrisValidation method will throw an error if the model doesn't validate according to the rules. However, the default message is in English. It should be investigated if we can somehow send error codes which could then be translated on the client, or send whatever languages we want.

Comments (1)

  1. Log in to comment