Ui Builder form component, keep the focus on the filed, if values less then 4 character long

SundaramR
Tera Guru

Hi,

 

In ServiceNow UI Builder, I have a form component and need to enforce a validation rule:
If a field’s value (after trimming whitespace) is less than 4 characters, the focus should stay on that field until it’s corrected.

 

I also want the same validation to run when editing an existing record, ensuring the field is validated and focused

if it doesn’t meet the requirement.

 

What’s the best approach to implement this behavior within a UI Builder form component?

 

Thanks

1 REPLY 1

Dibyaratnam
Tera Sage

Its really difficult to manipulate the DOM of an object in UI Builder components. I am not sure if thats possible currently.