Hello David and Jeremy.
Thanks for your suggestions, it was a realy help.
I didn't know about the .isValid() property of the field.
Now it's easy.
Jeremy, I changed your code a little bit and finaly this is what I needed.
Thank's again!
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:label value="Some:" id="label1">
</xp:label>
<xp:inputText id="inputText1" required="true"
disableClientSideValidation="true">
<xp:this.validators>
<xp:validateRequired message="Value Required"></xp:validateRequired>
</xp:this.validators>
<xp:this.style><![CDATA[#{javascript:if(!getComponent('inputText1').isValid()){
return "border-color:rgb(255,0,0);border-style:solid;border-width:thin";
} else{
return "";
}}]]></xp:this.style>
</xp:inputText>
<xp:messages id="messages1"></xp:messages>
<xp:button value="SUBMIT" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true"></xp:eventHandler>
</xp:button>
</xp:view>