Skip to content

Commit

Permalink
Corrected some part of bower.json and package.json and builded fo…
Browse files Browse the repository at this point in the history
…r v2.0.0-beta
  • Loading branch information
hsnaydd committed Feb 18, 2017
1 parent e858eb9 commit 83e5676
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 34 deletions.
20 changes: 6 additions & 14 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"name": "validetta",
"description": "A tiny jquery plugin for validate your forms",
"version": "1.0.1",
"description": "A tiny javascript library for validate your forms",
"version": "2.0.0-beta",
"homepage": "http://lab.hasanaydogdu.com/validetta/",
"author": {
"name": "Hasan Aydoğdu",
"email": "hasan_aydogdu@windowslive.com",
"url": "http://www.hasanaydogdu.com"
},
"license": {
"type": "MIT",
"url": "https://github.com/hsnayd/validetta/blob/master/LICENCE"
},
"author": "Hasan Aydoğdu <hsnaydd@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/hsnayd/validetta.git"
"url": "https://github.com/hsnaydd/validetta.git"
},
"main": [
"dist/validetta.css",
Expand All @@ -39,7 +32,6 @@
"LICENCE",
"Gruntfile.js",
"package.json",
"validetta.jquery.json",
"bower.json"
]
}
}
4 changes: 2 additions & 2 deletions dist/validetta.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* Validetta (https://github.com/hsnaydd/validetta)
* Version 1.0.1 (27-08-2016 16:21)
* Version 2.0.0-beta (18-02-2017 23:22)
* Licensed under MIT (https://github.com/hsnaydd/validetta/blob/master/LICENCE)
* Copyright 2013-2016 Hasan Aydoğdu <hsnaydd@gmail.com>
* Copyright 2013-2017 Hasan Aydoğdu <hsnaydd@gmail.com>
*/

.validetta-bubble {
Expand Down
26 changes: 15 additions & 11 deletions dist/validetta.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* Validetta (https://github.com/hsnaydd/validetta)
* Version 1.0.1 (27-08-2016 16:21)
* Version 2.0.0-beta (18-02-2017 23:22)
* Licensed under MIT (https://github.com/hsnaydd/validetta/blob/master/LICENCE)
* Copyright 2013-2016 Hasan Aydoğdu <hsnaydd@gmail.com>
* Copyright 2013-2017 Hasan Aydoğdu <hsnaydd@gmail.com>
*/

(function() {
Expand All @@ -15,7 +15,7 @@
// Current fields/fields
var FIELDS = {};
// RegExp for input validate rules
var RRULE = new RegExp(/^(minChecked|maxChecked|minSelected|maxSelected|minLength|maxLength|equalTo|different|regExp|remote|callback)\[([\w\[\]]+)\]/i);
var RRULE = new RegExp(/^([a-zA-Z]+)\[([\w\[\]]+)\]/i);
// RegExp for mail control method
// @from ( http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29 )
var RMAIL = new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/);
Expand Down Expand Up @@ -121,7 +121,8 @@
* @return {Object} merged object
*/
var mergeObject = function(obj1, obj2) {
var obj3 = {}, propertyName;
var obj3 = {},
propertyName;
for (propertyName in obj1) {
if (obj1.hasOwnProperty(propertyName)) {
obj3[propertyName] = obj1[propertyName];
Expand Down Expand Up @@ -275,12 +276,15 @@
creditCard: function(tmp) {
// allow empty because empty check does by required metheod
if (tmp.val === '') return true;
var reg, cardNumber, pos, digit, i, subTotal, sum = 0, strlen;
reg = new RegExp(/[^0-9]+/g);
cardNumber = tmp.val.replace(reg, '');
strlen = cardNumber.length;
var pos,
digit,
subTotal,
sum = 0;
var reg = new RegExp(/[^0-9]+/g);
var cardNumber = tmp.val.replace(reg, '');
var strlen = cardNumber.length;
if (strlen < 16) return messages.creditCard;
for (i = 0; i < strlen; i++) {
for (var i = 0; i < strlen; i++) {
pos = strlen - i;
digit = parseInt(cardNumber.substring(pos - 1, pos), 10);
if (i % 2 === 1) {
Expand Down Expand Up @@ -325,8 +329,8 @@
return count === 1;
},
// Custom reg check
regExp: function(tmp, self) {
var _arg = self.options.validators.regExp[tmp.arg],
pattern: function(tmp, self) {
var _arg = self.options.validators.pattern[tmp.arg],
_reg = new RegExp(_arg.pattern);
return _reg.test(tmp.val) || _arg.errorMessage;
},
Expand Down
4 changes: 2 additions & 2 deletions dist/validetta.min.css

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

Loading

0 comments on commit 83e5676

Please sign in to comment.