cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Text field validation tab doesn't work on load

MW_10212619
5-Regular Member

Text field validation tab doesn't work on load

Hi all, i'm trying to validate if text field input is empty using validation tab builded in Thingworx (v 9.3.4). Unfortunatelly, it doesn't work at all on mashup load. I mean that even if i select 'Invalid' ValidationState there is no changes on mashup, it looks like the input was valid. It starts to work only after lost focus on text field input and, after that, it looks to work fine but i see no way to trigger that focus lost event without clicking on mashup.

 

 

2 REPLIES 2
yue
10-Marble
10-Marble
(To:MW_10212619)

Hello @MW_10212619 , Text filed validation configured in validation tab is triggered when lost focus on text field. It's unable to trigger validation by mashup load event and bind mashup load event to FocusLost event of text field. 

M4RC
14-Alexandrite
(To:yue)

Hello @MW_10212619 ,

 

if you really want a validation before the status "lost focus", I recommend you to assign a custom CSS class using an expression.

 

Here is an Example:

//Expression
Output = content ? "" : "myCustomClass";
//CSS
.myCustomClass {
    border: 1px red solid !important;
}

 

Best regards

Marc

Top Tags