question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Form Field (phone example bugs/feature enhancements)

See original GitHub issue

Bug/Feature enhancement

In this provided example of a phone number: creating-a-custom-form-field-control There is a few things that are lacking:

  • Size is not enforced. the Demo has size 3 but a user is allowed to type as many char as they want. – The extra char’s (more than 3) are overflow hidden so you dont see them. – After writing this up, I found this should be maxlength="3"
  • Auto advance. It would be nice if the input would auto advance to the next into once the size has been reached.
  • The span dashes are selectable (implementation css could turn this off).
  • Since this is actually one form control, it would be nice to highlight all number at once and hit delete to clear out the values (but dont know if this is possible since they are separate input boxes)
  • The demo works in the link but when you click open in stackblitz … the HTML file is empty … therefore the demo does not work

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
michahellcommented, Oct 25, 2018

Can we get someone to look at this? it appears that there is a need for being able to create custom form components, but it is entirely unclear as to how to get validation, value passing and error highlighting working… also see https://github.com/angular/material2/issues/13624

2reactions
ZouZoucommented, Oct 10, 2018

I was able to create a custom mat-form-field which implements MatFormFieldControl, I was also able to make it work with formControl however whenever the field is invalid, the color of the entire mat-form-field does not change as a normal mat-form-field, it should turn to red but it’s not, because the class mat-form-field-invalid is not being added.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom form enhancements | Adobe Workfront
The following significant enhancements were made for managing custom forms in the 22.2 release.
Read more >
Changelog - Customer Fields
New feature: Collect multiple sets of custom data using a 'Repeating group' field - Learn more · Added accessibility support to embedded forms...
Read more >
Separate enhancements from severity field / Bug classification ...
The current severity field implies enhancements are a severity on their own - but they're not really. Enhancements could be critical, minor, trivial,...
Read more >
How to Effectively Prioritize Bug Fixes vs Product Features?
Product teams make truly challenging product vs bug fix decisions by using one of these common product prioritization methods. Learn more!
Read more >
Define, capture, triage, and manage software bugs in Azure ...
Prerequisites; Bug work item type; Fields specific to bugs; Choose how your team tracks bugs; Customize work item type; Add or capture bugs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found