Skip to content

Commit 6ba13ea

Browse files
committed
README and DEMO
1 parent 7962803 commit 6ba13ea

2 files changed

Lines changed: 12 additions & 28 deletions

File tree

README.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# HTML Input Type SerialNumber
2-
A new type of HTML Input field which is specially built for Serial Numbers. It assists the user while filling out the input field LIVE.
2+
A widget that assists users while filling out HTML Input fields intended for Serial Numbers.
33

44
## _LIVE_ Pattern Matching and Auto Completion
55

@@ -9,7 +9,7 @@ It test for the Regular Expression separately on separate pieces of the input, i
99
### Auto Completion
1010
Some Serial Numbers have separating characters, such as dashes, between the pieces. This input field __automatically adds__ those separators wherever required.
1111

12-
Since both these features LIVE, this software __assists__ the user while filling out the Serial Number, instead of simply pointing out that it was wrong.
12+
Since both these features LIVE, this widget __assists__ the user while filling out the Serial Number, instead of simply pointing out that it was wrong.
1313

1414
## [DEMO](http://ishpreet.tech/projects/HTML-Input-Type-SerialNumber/demo)
1515

@@ -28,13 +28,13 @@ Since both these features LIVE, this software __assists__ the user while filling
2828
$("input[type='serialnumber']").serialnumberinput(
2929
{
3030
/*
31-
The following configuration would allow a serial number in the format 12-34\AB-CD
31+
The following configuration would allow a serial number of the format 000\00\A
3232
*/
33-
"separator": "-",
33+
"separator": "\\",
3434
"pieces":
3535
[
3636
{
37-
"length": 2,
37+
"length": 3,
3838
"pattern": "[0-9]",
3939
},
4040
{
@@ -46,17 +46,9 @@ Since both these features LIVE, this software __assists__ the user while filling
4646
},
4747
{
4848
"type": "separator",
49-
"separator": "\\",
50-
},
51-
{
52-
"length": 2,
53-
"pattern": "[a-zA-Z]",
5449
},
5550
{
56-
"type": "separator",
57-
},
58-
{
59-
"length": 2,
51+
"length": 1,
6052
"pattern": "[a-zA-Z]",
6153
},
6254
],
@@ -90,4 +82,4 @@ _Ishpreet Singh Bhasin_
9082

9183
[__Website__](http://ishpreet.tech/)
9284

93-
[__GitHub__](https://github.com/ish-101/)
85+
[__GitHub__](https://github.com/ish-101)

demo/index.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ <h1>HTML-Input-Type-SerialNumber</h1>
1010
<hr>
1111
<h2>Demo</h2>
1212
<hr>
13-
<p>Enter a Serial Number in the format <b>12-34\AB-CD</b></p>
13+
<p>Enter a Serial Number in the format <b>000\00\A</b></p>
1414
<p style="color: red;">Anything else would lead to deletion of the entered character.</p>
1515
<input type="serialnumber">
1616
<script type="text/javascript">
1717
$("input[type='serialnumber']").serialnumberinput(
1818
{
1919
/*
20-
The following configuration would allow a serial number of the format 12-34\AB-CD
20+
The following configuration would allow a serial number of the format 000\00\A
2121
*/
22-
"separator": "-",
22+
"separator": "\\",
2323
"pieces":
2424
[
2525
{
26-
"length": 2,
26+
"length": 3,
2727
"pattern": "[0-9]",
2828
},
2929
{
@@ -35,17 +35,9 @@ <h2>Demo</h2>
3535
},
3636
{
3737
"type": "separator",
38-
"separator": "\\",
39-
},
40-
{
41-
"length": 2,
42-
"pattern": "[a-zA-Z]",
4338
},
4439
{
45-
"type": "separator",
46-
},
47-
{
48-
"length": 2,
40+
"length": 1,
4941
"pattern": "[a-zA-Z]",
5042
},
5143
],

0 commit comments

Comments
 (0)