Skip to content

Commit fe7ad76

Browse files
author
Kurtis LoVerde
committed
Function class shouldn't return an object. Bump to 1.0.1.
1 parent 259fa97 commit fe7ad76

File tree

5 files changed

+32
-29
lines changed

5 files changed

+32
-29
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Release 1.0.1 (April 2, 2016)
2+
3+
* Minor under-the-hood improvement. No change to functionality.
4+
5+
16
## Release 1.0 (April 2, 2016)
27

38
* First release

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
RestrictedTextField v1.0
2-
========================
1+
RestrictedTextField v1.0.1
2+
==========================
33

44
See LICENSE for this software's licensing terms.
55

demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22

33
<!--
4-
RestrictedTextField v1.0
4+
RestrictedTextField v1.0.1
55
https://www.github.com/kloverde/jquery-RestrictedTextField
66
77
Copyright (c) 2016 Kurtis LoVerde

jquery.restrictedtextfield.js

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* RestrictedTextField v1.0
2+
* RestrictedTextField v1.0.1
33
* https://www.github.com/kloverde/jquery-RestrictedTextField
44
*
55
* This software is licensed under the 3-clause BSD license.
@@ -14,32 +14,30 @@
1414

1515
/**
1616
* Developers: Instantiate this to add your own types
17-
*/
17+
*/
1818
$.fn.RestrictedTextFieldConfig = function() {
1919
var dest = $.fn.RestrictedTextFieldConfig.customTypes = $.fn.RestrictedTextFieldConfig.customTypes || [];
2020

21-
return {
22-
/**
23-
* Adds a custom type
24-
*
25-
* @param id - The identifier you will use to access the new type
26-
*
27-
* @param fullRegex - RegExp object. This regular expression describes what a valid value looks like when the user is finished
28-
* entering data, NOT what valid input looks like as it's being entered. If your type is complex, like a
29-
* phone number for example, you need to provide a value for partialRegex to ensure that your user will be
30-
* able to continue to type into the field. If partialRegex is not defined or is null, the text field will
31-
* be validated against this regular expression on every keystroke. Notwithstanding any of the foregoing,
32-
* this regular expression is also used to validate the text field on blur.
33-
*
34-
* @param partialRegex - RegExp object. This regular expression describes what a valid value looks like while the user is entering
35-
* it, NOT what valid input looks like after the user has finished. If you provide a value for this, this
36-
* regular expression will be used to validate the text field on every keystroke. This parameter may be
37-
* null, but if your type is complex, you will find it necessary to provide a value.
38-
*/
39-
addType : function addType( id, fullRegex, partialRegex ) {
40-
_addType( dest, id, fullRegex, partialRegex );
41-
}
42-
};
21+
/**
22+
* Adds a custom type
23+
*
24+
* @param id - The identifier you will use to access the new type
25+
*
26+
* @param fullRegex - RegExp object. This regular expression describes what a valid value looks like when the user is finished
27+
* entering data, NOT what valid input looks like as it's being entered. If your type is complex, like a
28+
* phone number for example, you need to provide a value for partialRegex to ensure that your user will be
29+
* able to continue to type into the field. If partialRegex is not defined or is null, the text field will
30+
* be validated against this regular expression on every keystroke. Notwithstanding any of the foregoing,
31+
* this regular expression is also used to validate the text field on blur.
32+
*
33+
* @param partialRegex - RegExp object. This regular expression describes what a valid value looks like while the user is entering
34+
* it, NOT what valid input looks like after the user has finished. If you provide a value for this, this
35+
* regular expression will be used to validate the text field on every keystroke. This parameter may be
36+
* null, but if your type is complex, you will find it necessary to provide a value.
37+
*/
38+
this.addType = function( id, fullRegex, partialRegex ) {
39+
_addType( dest, id, fullRegex, partialRegex );
40+
}
4341
};
4442

4543
$.fn.restrictedTextField = function( options ) {

jquery.restrictedtextfield.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)