Skip to content

Jody-Geers/char-max-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

browser-friendly-max-input

validates client input char amount and updates ui.

Installation

Install with component(1):

$ component install Jody-Geers/browser-friendly-max-input

API

<!-- example ui -->
textarea <span id="output-area">500</span> characters remaining<br/>
<textarea class="textarea" maxlength="500" id="input-area" ></textarea>

<script>
	var maxInputVal = require( 'Jody-Geers-browser-friendly-max-input' );
	
	// attach behaviour
	// output 'targetId' optional
	maxInputVal.attachMaxInputValidation({
		elId : "input-area",
		targetId : "output-area"
	});
</script>

License

MIT

About

browser friendly character count input validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published