jbogard / ContosoUniversityCore

MIT License
590 stars 150 forks source link

Handling server side validation in the UI? #8

Open dotnetshadow opened 7 years ago

dotnetshadow commented 7 years ago

Firstly a great sample to learn about mediatr

I was wondering how would you handle the validation on the server with javascript disabled?

When I ran the sample I noticed that it returns a json validation response for RuleFor(), so in the UI how would you handle that so you can display a nice message to the user?

I noticed that the Create Post method wasn't even called

jbogard commented 7 years ago

TBQH I don't think about that scenario really?

On Sat, Feb 18, 2017 at 3:47 AM, dotnetshadow notifications@github.com wrote:

Firstly a great sample to learn about mediatr

I was wondering how would you handle the validation on the server with javascript disabled? When I ran the sample I noticed that it returns a json validation response for RuleFor(), so in the UI how would you handle that so you can display a nice message to the user?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbogard/ContosoUniversityCore/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGYMtSTykHcr--3rofuuHu4E-q86mEGks5rdrALgaJpZM4MFDPk .