Validation errors

Prodibas uses comprehensive validation of incoming data. The ruleset consists of approximately 100 rules, some of which relate to other products in the system. There are also rules regarding roles and the right to change some data. If the API refuses to write data because of validation rules, it responds with one or several ModelValidationExceptions.

Client-side should always verify the result of writing data to Prodibas. Client-side should also provide a way to present a report to the end-user.

    [Serializable]
    public class ModelValidationException : Exception
    {
        public string Field { get; set; }
        public string Message { get; set; } // inherited from Exception, listed here because it is important
    }