You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.
What happened?
Requirement:
All fields are required fields Name, External target type, Namespace, Button.
"ADD" button is going to validate the form, this button is disabled until form is valid.
Name: Input Text External target type: Select drop down Namespace: Input (Conditional render field if external target type is "OPC UA") Button: button is going to validate the form, this button should be disabled until form is valid.
Description:
We have encountered an issue where all form fields are displayed as invalid by default, even if there has been no user interaction. This behavior is causing confusion for users and affecting the form's usability.
Additional Information:
We have implemented the below custom customRequiredValidator to address the issue as suggested in IX guidelines:
This approach has issues with validating form fields while submitting. The form fields should not display as invalid until the user interacts with them, and the submit button should be disabled by default as fields are required.
export function customRequiredValidator(): ValidatorFn {
return (control: AbstractControl) => {
if (!control.untouched) {
return Validators.required(control);
}
return null;
};
}
Expected Behavior:
Form fields should not be displayed as invalid until the user interacts with them (e.g., focuses and blurs the field). Additionally, the submit button should be disabled by default as fields are required.
Prerequisites
What happened?
Requirement:
All fields are required fields Name, External target type, Namespace, Button.
"ADD" button is going to validate the form, this button is disabled until form is valid.
Here is the stackblitz example: https://stackblitz.com/edit/bvquhwlw-lcec2rb4?file=src%2Fvalidation.ts,src%2Fapp%2Fapp.module.ts
Output of above stackblitz example:

Name: Input Text
External target type: Select drop down
Namespace: Input (Conditional render field if external target type is "OPC UA")
Button: button is going to validate the form, this button should be disabled until form is valid.
Description:
We have encountered an issue where all form fields are displayed as invalid by default, even if there has been no user interaction. This behavior is causing confusion for users and affecting the form's usability.
Additional Information:
We have implemented the below custom customRequiredValidator to address the issue as suggested in IX guidelines:
This approach has issues with validating form fields while submitting. The form fields should not display as invalid until the user interacts with them, and the submit button should be disabled by default as fields are required.
Expected Behavior:
Form fields should not be displayed as invalid until the user interacts with them (e.g., focuses and blurs the field). Additionally, the submit button should be disabled by default as fields are required.
Example:
We have followed guidelines from IX customRequiredValidator approach, here the ADD button is enabled even though no values are entered. It should be disabled.
https://stackblitz.com/edit/bvquhwlw-nfd16esa?file=src%2Fvalidation.ts,src%2Fapp%2Fapp.module.ts
What type of frontend framework are you seeing the problem on?
Angular
Which version of iX do you use?
2.6.1
Code to produce this issue.
The text was updated successfully, but these errors were encountered: