Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple validation messages in Controller #1234

Closed
thiagoburgo opened this issue Jul 25, 2016 · 1 comment
Closed

Multiple validation messages in Controller #1234

thiagoburgo opened this issue Jul 25, 2016 · 1 comment
Labels
Milestone

Comments

@thiagoburgo
Copy link

Hi,

To reproduce problem, change default model of Abp template application, it will cause 4 required messages (I think one for each property in model) with "IsComplete" property as invalid.

  public class LoginViewModel
    {
        public string TenancyName { get; set; }
        public string UsernameOrEmailAddress { get; set; }
        public string Password { get; set; }
        public bool RememberMe { get; set; }

        [Required(ErrorMessage = "Test {0}")]
        public bool? IsComplete
        {
            get { return (Password.IsNullOrWhiteSpace() && UsernameOrEmailAddress.IsNullOrWhiteSpace()) ? (bool?)null : true; }
        }
    }
@hikalkan hikalkan added the bug label Jul 26, 2016
@hikalkan hikalkan added this to the v0.11.0 milestone Jul 26, 2016
@hikalkan
Copy link
Member

Yes, there is a bug here. This is fixed with this commit: ad77944#diff-763b1bbc7114cbc0bc0df6d68bf240d6R28
Will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants