Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Custom component in <oj-validation-group>

Jan Stanicek-OracleFeb 11 2020 — edited Feb 11 2020

I have created custom component which will be part of <oj-validation-group> and thus it is expected that it will be validated.

I have added property "valid" which make my component tracked by oj-validation-group, but I also need to understand how the oj-validation-group component behaves and how should I teach my component to behave to conform that process.

For example my component has optional "required" property which makes my component required depending on particular form where it is used.

I don't want to expose property "validators" since the validator list is constant.

I have exposed method validate which allows triggering validation process, returns promise with validation results ("valid" | "invalid"), sets valid property to "pending" | "invalid-shown" | "valid" and also apply | remove "oj-invalid" class on the component (which is supported in my css file).

The problem is that oj-validation-group consider also "invalid-hidden" state which I don't understand how it works. oj-validation-group is able to determine whether form is invalid even when it does not trigger validations and also it visually set invalid fields as invalid.

The only connection is method "showMessages", but what should be expected content?

And last question is regarding the displaying validation error in "inline" shape or into "notewindow". Is it something I need to do manually, or is there some API which I may use?

This post has been answered by Duncan Mills-Oracle on Feb 11 2020
Jump to Answer

Comments

Post Details

Added on Feb 11 2020
1 comment
283 views