I am facing an issue with two input fields that are both generated using the same template. I have set the required attribute to true for both of them by using the following code snippet:
...
templateOptions: {
...
required: true
}
One input field is registered through the formlyConfig.setType
method, while the other is registered using a directive. To demonstrate this issue, I have created a JS Bin here.
However, only the first input field is displaying the required attribute, while the second one is not. According to the documentation on custom templates (controller option), it states:
Provides you the ability to add custom behavior to the type without having to make an entire directive (you can make a directive instead if you wish).
Can anyone help me identify what mistake I might be making in this scenario?