-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-select required not working on pristine input #8529
Comments
@dohomi Thanks, we'll look into this. |
@topherfangio thanks for looking into it. Similar handling happens to the |
Un-deprecating as this deals with basic/expected functionality of form errors. |
Same happens in material version |
NOT READY FOR MERGE Need to share with others to see improved UI functionality and styles and get sign-off. Fixes angular#8529.
_NOT READY FOR MERGE - Need to share with others to see improved UI functionality/styles and get sign-off._ Fix styles and code to follow pristine/dirty styling of other input elements and provide CSS class for stand-alone usage. - Select now behaves like a normal input, appearing as invalid if the user focuses/blurs the element, or submits the form, without selecting an option. - Fix issues with floating labels not working on focus. - Add new `md-no-underline` CSS class to allow for stand-alone usage (non-form). - Update demos to show new stand-alone usage. Fixes angular#8529. Fixes angular#7988.
_NOT READY FOR MERGE - Need to share with others to see improved UI functionality/styles and get sign-off._ Fix styles and code to follow pristine/dirty styling of other input elements and provide CSS class for stand-alone usage. - Select now behaves like a normal input, appearing as invalid if the user focuses/blurs the element, or submits the form, without selecting an option. - Fix issues with floating labels not working on focus. - Add new `md-no-underline` CSS class to allow for stand-alone usage (non-form). - Update demos to show new stand-alone usage. Fixes angular#8529. Fixes angular#7988.
Fix styles and code to follow pristine/dirty styling of other input elements and provide CSS class for stand-alone usage. - Select now behaves like a normal input, appearing as invalid if the user focuses/blurs the element, or submits the form, without selecting an option. - Fix issues with floating labels not working on focus. - Add new `md-no-underline` CSS class to allow for stand-alone usage (non-form). - Update demos to show new stand-alone usage. Additionally, the select component currently sets the `isOpen` variable on the `$scope`. This can cause conflicts if the user has their own `isOpen` variable on the scope. Fix by privatizing our own variable to `_mdSelectIsOpen` to reduce chances of a conflict. Fixes angular#8529. Fixes angular#7988. Fixes angular#8527.
Fix styles and code to follow pristine/dirty styling of other input elements and provide CSS class for stand-alone usage. - Select now behaves like a normal input, appearing as invalid if the user focuses/blurs the element, or submits the form, without selecting an option. - Fix issues with floating labels not working on focus. - Add new `md-no-underline` CSS class to allow for stand-alone usage (non-form). - Update demos to show new stand-alone usage with required example. - Standardize asterisk visibility when required when standalone or inside of a `<md-input-container>` Additionally, the select component currently sets the `isOpen` variable on the `$scope`. This can cause conflicts if the user has their own `isOpen` variable on the scope. Fix by privatizing our own variable to `_mdSelectIsOpen` to reduce chances of a conflict. Fixes angular#8529. Fixes angular#7988. Fixes angular#8527.
Still not working on pristine input. |
@gerardcarbo I looked at your Codepen, as I was having the same issue, but I think I figured it out.
|
Actual behavior:
User submit form but md-select required attribute is ignored
md-select should show required message and red borders around the
md-input-container
directly if the user hitsSAVE
CodePen or Steps to reproduce the issue: *
User hits
SAVE
button and there is no indicator that themd-select
is required. This is misleading and it is currently impossible to showng-messages
to required attribute onmd-select
elements.If the User selects
FAVORITE NUMBER
and hitsCLEAR
theng-messages
are shown correctlyAngular Versions: *
Additional Information:
The text was updated successfully, but these errors were encountered: