Skip to content

Commit

Permalink
version 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
stuyam committed Sep 11, 2019
1 parent ea2d438 commit 8edf98d
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 22 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "simple-react-validator",
"description": "A simple react form validator inspired by Laravel validation.",
"main": "dist/simple-react-validator.min.js",
"version": "1.2.3",
"version": "1.2.4",
"authors": [
"Stuart Yamartino"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/locale/es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simple React Validator v1.2.3 | Created By Dockwa | MIT License | 2017 - Present
// Simple React Validator v1.2.4 | Created By Dockwa | MIT License | 2017 - Present
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['simple-react-validator'], factory);
Expand Down
2 changes: 1 addition & 1 deletion dist/locale/fr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simple React Validator v1.2.3 | Created By Dockwa | MIT License | 2017 - Present
// Simple React Validator v1.2.4 | Created By Dockwa | MIT License | 2017 - Present
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['simple-react-validator'], factory);
Expand Down
2 changes: 1 addition & 1 deletion dist/locale/min/es.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/locale/min/fr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/locale/min/sr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/locale/min/template-en.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions dist/locale/sr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Simple React Validator v1.2.4 | Created By Dockwa | MIT License | 2017 - Present
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['simple-react-validator'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('simple-react-validator'));
} else {
root.SimpleReactValidatorLocaleSr = factory(root.SimpleReactValidator);
}
}(this, function(SimpleReactValidator) {
"use strict";

var sr = {
accepted: 'Polje :attribute mora biti prihvaćeno.',
after: 'Polje :attribute mora biti nakon :date.',
after_or_equal: 'Polje :attribute mora biti nakon ili na :date.',
alpha: 'Polje :attribute može sadržati samo slova.',
alpha_space: 'Polje :attribute može sadržati samo slova i razmake.',
alpha_num: 'Polje :attribute može sadržati samo slova i brojeve.',
alpha_num_space: 'Polje :attribute može sadržati samo slova, brojeve i razmake.',
alpha_num_dash: 'Polje :attribute može sadržati samo slova, brojeve i crte.',
alpha_num_dash_space: 'Polje :attribute može sadržati samo slova, brojeve, crte i razmake.',
array: 'Polje :attribute mora biti niz.',
before: 'Polje :attribute mora biti pre :date.',
before_or_equal: 'Polje :attribute mora biti pre ili na :date.',
between: 'Polje :attribute mora biti između :min i :max:type.',
"boolean": 'Polje :attribute mora biti istinitosna vrednost.',
card_exp: 'Polje :attribute mora biti validan datum isteka.',
card_num: 'Polje :attribute mora biti validan broj kreditne kartice.',
currency: 'Polje :attribute mora biti validna valuta.',
date: 'Polje :attribute mora biti datum.',
date_equals: 'Polje :attribute mora biti na :date.',
email: 'Polje :attribute mora biti validna email adresa.',
"in": 'Izabrano polje :attribute mora biti :values.',
integer: 'Polje :attribute mora biti ceo broj.',
max: 'Polje :attribute ne sme biti veće od :max:type.',
min: 'Polje :attribute mora biti veće od :min:type.',
not_in: 'Izabrano polje :attribute ne sme biti :values.',
not_regex: 'Polje :attribute ne sme biti u određenom formatu.',
numeric: 'Polje :attribute mora biti broj.',
phone: 'Polje :attribute mora biti validan broj telefona.',
regex: 'Polje :attribute mora biti u određenom formatu.',
required: 'Polje :attribute je obavezno.',
size: 'Polje :attribute mora biti :size:type.',
string: 'Polje :attribute mora biti niska.',
"typeof": 'Polje :attribute nije ispravan tip :type.',
url: 'Polje :attribute mora biti URL.'
};
SimpleReactValidator.addLocale('sr', sr);
return sr;
}));
2 changes: 1 addition & 1 deletion dist/locale/template-en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simple React Validator v1.2.3 | Created By Dockwa | MIT License | 2017 - Present
// Simple React Validator v1.2.4 | Created By Dockwa | MIT License | 2017 - Present
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['simple-react-validator'], factory);
Expand Down
14 changes: 8 additions & 6 deletions dist/simple-react-validator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simple React Validator v1.2.3 | Created By Dockwa | MIT License | 2017 - Present
// Simple React Validator v1.2.4 | Created By Dockwa | MIT License | 2017 - Present
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['react'], factory);
Expand All @@ -14,7 +14,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }

function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

Expand Down Expand Up @@ -50,7 +50,9 @@ function () {
_classCallCheck(this, SimpleReactValidator);

_defineProperty(this, "showMessageFor", function (field) {
_this.visibleFields.push(field);
if (!_this.visibleFields.includes(field)) {
_this.visibleFields.push(field);
}

_this.helpers.forceUpdateIfNeeded();
});
Expand Down Expand Up @@ -308,7 +310,7 @@ function () {
"in": {
message: 'The selected :attribute must be :values.',
rule: function rule(val, params) {
return params.indexOf(val) > -1;
return params.includes(val);
},
messageReplace: function messageReplace(message, params) {
return message.replace(':values', _this.helpers.toSentence(params));
Expand Down Expand Up @@ -341,7 +343,7 @@ function () {
not_in: {
message: 'The selected :attribute must not be :values.',
rule: function rule(val, params) {
return params.indexOf(val) === -1;
return !params.includes(val);
},
messageReplace: function messageReplace(message, params) {
return message.replace(':values', _this.helpers.toSentence(params));
Expand Down Expand Up @@ -561,7 +563,7 @@ function () {
return SimpleReactValidator;
}();

_defineProperty(SimpleReactValidator, "version", '1.2.0');
_defineProperty(SimpleReactValidator, "version", '1.2.4');

_defineProperty(SimpleReactValidator, "locales", {
'en': {}
Expand Down
Loading

0 comments on commit 8edf98d

Please sign in to comment.