Spry

Block extra characters

You can prevent your users from entering more than the maximum number of allowed characters in a Validation Text Area widget. For example, if you set the useCharacterMasking option so that a widget can accept no more than 20 characters, the user cannot type more than 20 characters in the text area.

Use this option in conjunction with the maxChars option. For information, see Specify a minimum and maximum number of characters.

 To block extra characters, add the useCharacterMasking property to the constructor and set its value to true, as follows:
<script type="text/javascript">
	var textareawidget1 = new Spry.Widget.ValidationTextarea("textareawidget1", maxChars:20, {useCharacterMasking:true});
</script>

Comments

Comments are no longer accepted for Spry 1.4. Spry 1.6 is the current version. To discuss Spry 1.4, please use the Adobe forum.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/en_US/Spry/1.4/WS4365B344-2C7C-4dff-A47E-09D4CC094744.html