Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Xiao committed Jan 15, 2019
2 parents 3ff8917 + 3629833 commit 2ab0f91
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Tested on IE9+ and Chrome and Safari(10.0.3)
|type | Opt | Str | | "text" |
|value | Opt | Str | | "" |
|disabled | Opt | Bool | | false |
|autoComplete | Opt | Str | | "on" |
|maxLength | Opt | Str | Num | | 524288 |
|placeholder | Opt | Str | | "" |
|**validate** |**Opt**|**Bool**|**If you have a submit button and trying to validate all the inputs of your form at once, toggle it to true, then it will validate the field and pass the result via the "validationCallback" you provide.**|**false** |
Expand Down
5 changes: 5 additions & 0 deletions lib/components/Textbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ var TYPE = 'textbox';
var VALIDATE_OPTION_TYPE_LIST = ['string', 'number'];
var DEFAULT_MAX_LENGTH = 524288; // Default value is 524288

var DEFAULT_AUTO_COMPLETE = 'on'; // Default value is on

var getDefaultValidationOption = function getDefaultValidationOption(obj) {
var reg = obj.reg,
min = obj.min,
Expand Down Expand Up @@ -461,6 +463,7 @@ function (_React$Component) {
value = _ref4.value,
disabled = _ref4.disabled,
maxLength = _ref4.maxLength,
autoComplete = _ref4.autoComplete,
placeholder = _ref4.placeholder,
classNameWrapper = _ref4.classNameWrapper,
classNameContainer = _ref4.classNameContainer,
Expand Down Expand Up @@ -508,6 +511,7 @@ function (_React$Component) {
type: type,
value: value,
disabled: disabled,
autoComplete: autoComplete,
maxLength: Number(maxLength),
onBlur: this.onBlur,
onKeyUp: this.onKeyUp,
Expand Down Expand Up @@ -543,6 +547,7 @@ _defineProperty(Index, "defaultProps", {
value: '',
disabled: false,
validate: false,
autoComplete: DEFAULT_AUTO_COMPLETE,
maxLength: DEFAULT_MAX_LENGTH,
placeholder: '',
classNameInput: '',
Expand Down
6 changes: 3 additions & 3 deletions lib/react-inputs-validation.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-inputs-validation.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/react-inputs-validation.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-inputs-validation.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-inputs-validation",
"version": "2.1.3",
"version": "2.1.4",
"description": "a react inputs validation component",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 2ab0f91

Please sign in to comment.