Skip to content

Support validation errors on checkboxes and radio buttons #11333

Closed

Description

@anthony-o

Bug, feature request, or proposal:

Support validation errors in checkboxes and radio buttons. For instance, displaying radio button labels in red when required mat-radio-group was not filled-in.

What is the expected behavior?

This stackblitz should display red label on the radio buttons when clicking on "Submit".
It contains one required mat-radio-group (with multiple mat-radio-buttons in it) and one required input.

What is the current behavior?

Currently, only the text input in the mat-form-field is correctly displayed in red when clicking on Submit.

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

StackBlitz starter: https://goo.gl/wwnhMV

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 5.2.0 as well as 6.0.0

Activity

  1. Mr-Eluzive commented on May 24, 2018

    @Mr-Eluzive

    I think it would be useful feature and if no one mind then I can try do something with this. But I think it also require some work on #7891 because right now there is no label.

  2. josephperrott commented on May 30, 2018

    @josephperrott
    Member

    Duplicate of #7891

  3. andresroberto commented on Aug 1, 2019

    @andresroberto

    #7891 was about using checkbox and radio buttons inside a form-field. This issue is about supporting error highlighting in checkboxes and radio buttons, not necessarily by using checkbox and radio buttons inside a form-field. Therefore, even though they are related, I don't think this is a duplicate. And it would be awesome to have required radio buttons get red when trying to submit them empty.

  4. angular-automatic-lock-bot commented on Sep 11, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions