carlosrovira commented on issue #991:
URL: https://github.com/apache/royale-asjs/issues/991#issuecomment-740814919
Hi,
this seems more a compiler issue about handling errors. Hope other could
take a look.
A valid syntax will be something like:
```actionscript
<fx:Script>
<![CDATA[
public function minLength(host:TextInput):String {
return someCheck ? "" : "something wrong here";
}
]]>
</fx:Script>
<c:beads>
<js:ContainerDataBinding/>
</c:beads>
<j:FormItem label="Mot de passe">
<j:TextInput id="txtpass1" width="180">
<j:beads>
<j:PasswordInput />
<j:MaxNumberCharacters maxlength="15"/>
<j:StringValidator
id="pass_v"
required="1"
validateFunction="{minLength}"
maxLength="15" requiredFieldError="Le mot de
passe est obligatoire"
/>
</j:beads>
</j:TextInput>
</j:FormItem>
```
You need to add a binding bead and use a custom function that returns a
String. Check TDJ for another similar example like this
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]