Property Validation by Dynamic Length
Hi All,
I need an edit to validate the rule with a dynamic length parameter.
Scenario: I have a list (the number is unknown) in this list keeping types of properties. If the property type is text, the maximum length is set for each text type. This data is kept in the clipboard and comes to the UI using the repeating dynamic layout (I'm using the same property for each text field). I need to verify different lengths for each text, how can I do this?
For Example;
Option(1); Name:Text1 / Type:Text / Length:5
Option(2); Name:Text2 / Type:Text / Length:10
Option(3); Name:Text3 / Type:Text / Length:15
Note: I can do this with activity but I want to use it on the Client-Side. I want to show an error message without any action if the text is shorter than the length.
I want to use dynamic parameters instead of "5" in java source code. Is it possible? Or is there any other way to do this?
if (theValue.length() > 5){
theProperty.addMessage("Text should be equal or shorter than 5");
return false;
}
return true;