Enforce uppercase, lowercase, or Capitalized inputs & textareas
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist v1.0.1 May 26, 2017
src v1.0.1 May 26, 2017
.editorconfig Initial Sep 25, 2016
.gitignore v1.0.0 Feb 27, 2017
CHANGELOG.md dont enforce case on placeholder May 25, 2017
LICENSE v1.0.0 Feb 27, 2017
README.md Update README.md Jul 13, 2018
bower.json fix manifest files May 26, 2017
gulpfile.js dont enforce case on placeholder May 25, 2017
index.html dont enforce case on placeholder May 25, 2017
package.json fix manifest files May 26, 2017

README.md

input-case-enforcer

NPM Version NPM Downloads Buy Me a Coffee

input-case-enforcer is a plugin for enforcing uppercase, lowercase, or Capitalized inputs & textareas.

Requires a DOM library such as jQuery, Zepto, or any that supports extending $.fn

Demo

https://jsfiddle.net/t4gdquqs/1/

Install

Yarn, NPM, or Bower

yarn add input-case-enforcer

npm install input-case-enforcer

bower install input-case-enforcer

<!-- Then include the dist files in your HTML -->
<link rel="stylesheet" type="text/css" href="input-case-enforcer/dist/input-case-enforcer.min.css" />
<style type="text/javascript" src="input-case-enforcer/dist/input-case-enforcer.min.js"></script>

Rails

# Gemfile
source 'https://rails-assets.org' do
  gem 'rails-assets-input-case-enforcer'
end

# app/assets/javascripts/application.js
//= require input-case-enforcer

# app/assets/javascripts/application.scss
/*
 *= require input-case-enforcer
*/

Usage

$('input').caseEnforcer('uppercase');

$('input').caseEnforcer('lowercase');

// capitalize the first letter of every word
$('textarea').caseEnforcer('capitalize');

// Remove case enforcer from an input
$('input').caseEnforcer('destroy');

Credits

Created by Weston Ganger