Mattermost-server: Display an error message if not required fields are provided

Created on 26 Sep 2019  Â·  8Comments  Â·  Source: mattermost/mattermost-server

When a user tries to submit a interactive dialog, but some fields are still missing, display an error message to the user indicating they haven’t filled in a ll the required fields. The error message should be “Check the entries on this form for errors”. The error message should also be shown, if there is validation error caused by the integration.

Error message can use the errorColor styling we have for the theme (which is red for the lighter themes), and the button can be its normal color, as we want it to be tapable, but the error needs to be visible

  • For webapp, we can present the error like you’ve shown, on the left in the footer
  • For webapp mobile, that error can be above the button tap.
  • For RN, we can even trigger a default native popover that informs the user that there is an error with the form, see example here:https://media.idownloadblog.com/wp-content/uploads/2016/03/cannot-get-mail-error-message-mail-app-in-ios.png

Note that this requires both changes in webapp and mobile.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-13154

AreToolkit Medium Help Wanted Up For Grabs

All 8 comments

I'm up for having a go at this (this would be my first time contributing to Mattermost). Just want to clarify the AC around this since the comments on the ticket conflict with the final requirements. Is there someone I can ping about this?

Hey @typeoh,

Thanks for your interest in this ticket. I will investigate what the expected behaviours exactly is.

Thanks @hanzei let me know when you've confirmed it!
I was thinking something along the lines of this:
Mattermost_scroll_to_error
I wasn't quite sure how to replicate the issue on the web app, so I just reduced the screen size - it would also be great to get some steps on how to reproduce that for other modals without the reduced screen size.

Hi @typeoh,

I've updated the ticket and redefined the expected behaviour. Let me know, if you still want to work on this.

@typeoh, is this still something towards which you'd like to contribute?

@lieut-data @hanzei Thanks for the updates apologies for the slow response. Yes I would! It looks like the latest AC is much simpler solution 👍 I should have some time to work on this this weekend!

Terrific! Thanks for checking in, and let us know if we can help in any way :)

@typeoh Just wanted to check if you need any help to get your PR out.

Was this page helpful?
0 / 5 - 0 ratings