Skip to content

Commit 1ec0d24

Browse files
committed
Fix typos
1 parent 5bbbec4 commit 1ec0d24

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RestrictedTextField is a jQuery plugin which uses regular expressions to validat
77

88
You might not need this plugin for your purposes - the HTML5 `pattern` attribute provides most of the same functionality. If, however, you must support browsers that don't support `pattern`, or if you want to make use of RestrictedTextField's additional features, then perhaps it might be a good fit for you.
99

10-
The biggest difference between this plugin and `pattern` is that RestrcitedTextField allows you to (optionally) suppress invalid keystrokes in real time, rather than allow them into the field to fail validation later. If you do want to allow invalid characters in, however, you have that option.
10+
The biggest difference between this plugin and `pattern` is that RestrictedTextField allows you to (optionally) suppress invalid keystrokes in real time, rather than allow them into the field to fail validation later. If you do want to allow invalid characters in, however, you have that option.
1111

1212
If you're only interested in `pattern`-based validation, you might still find RestrictedTextField useful. It provides the ability to disable its own validation implementation and use `pattern` exclusively. In this scenario, you'd just be using RestrictedTextField as a repository of pre-written regular expressions. Although you could just copy the regular expressions from the source code, you might find it easier on code maintenance to not be dropping multiple copies of the same regular expressions into your project.
1313

@@ -105,7 +105,7 @@ If you prefer not to use strictly-enforced credit card types (is Wikipedia corre
105105

106106
## Events
107107

108-
These events are fired based on the state of the text field, but only if `usePatternAttr` is disabled.
108+
These events are fired based on the state of the text field, but only if `usePatternAttr` is set to false.
109109

110110
| Event name | Description |
111111
| ------------------| ----------------------------------------------------------------|

demo/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h1>Test Drive</h1>
5353
<div id="instructions">
5454
<p>Here you can test drive RestrictedTextField's built-in types. Select a type from the dropdown menu and use the checkboxes to further customize the configuration.</p>
5555

56-
<p>If the <a href="http://caniuse.com/#search=pattern" target="_blank">pattern</a> attribute is disabled, RestrictedTextField uses its own validation implementation: validation is performed on each keystroke and on blur, and is done regardless of the state of the &quot;Discard invalid keystrokes&quot; checkbox. Event listeners flash the text field's border when a keystroke is discarded, and colors its border solid orange if an invalid character makes it into the field.</p>
56+
<p>If the <a href="http://caniuse.com/#search=pattern" target="_blank">pattern</a> attribute is disabled, RestrictedTextField uses its own validation implementation: validation is performed on each keystroke and on blur, and is done regardless of the state of the &quot;Discard invalid keystrokes&quot; checkbox. Event listeners flash the text field's border when a keystroke is discarded, and color its border solid orange if an invalid character makes it into the field.</p>
5757

5858
<p>Note that if using the pattern attribute, you will lose Luhn validation on credit card types and the Luhn type, as Luhn calculations cannot be performed with regular expressions. Patten mode is meant to be a pure HTML5 validation.</p>
5959

0 commit comments

Comments
 (0)