You can use the setup function if you want to change the border color to something else, set the property to an empty string if you don't want the border color to change when the input has an invalid value.
The If wanting to use a custom method that handles the displaying/removing of error messages you should use the two methods described above.
Modifying the server request The parameter containing the input value, sent to the server, will by default have the same name as the input.
You can however set your own parameter name by using the attribute By using the module sanitize you will be able to declare sanitation functions that will be triggered when inputs looses focus.
In such a case you must combine the method call with the on Success callback.