Skip to content

Commit f3819c2

Browse files
Merge remote-tracking branch 'github/master'
2 parents 4e92fbc + 9d7f824 commit f3819c2

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Harpreet Singh
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## **Android Validator**
2+
3+
Android validator is used for validating the user input using Annotation
4+
5+
There are some Annotation are
6+
7+
* @Email //for email validation
8+
* @Name //for Name validation
9+
* @Password // for Password min character length 8
10+
11+
With TextInputLayout and Custom Text
12+
13+
* @Email(message = "please enter valid Email", til = R.id.tilEmail) //for email validation
14+
* @Name(message = "please enter valid Name", til = R.id.tilName) //for Name validation
15+
* @Password(message = "please password", til = R.id.tilPassword) // for Password min character length 8
16+
17+
//til is the id of TextInputLayout
18+
19+
More are coming soon...
20+
21+
How to use?
22+
23+
24+
Step 1:
25+
26+
Project Gradle
27+
28+
allprojects {
29+
repositories {
30+
...
31+
maven { url 'https://jitpack.io' }
32+
}
33+
}
34+
35+
Step 2:
36+
37+
Add the dependency
38+
39+
dependencies {
40+
compile 'com.github.harpzzz:Android-Validator:v0.2'
41+
}
42+
43+
44+
Step 3:
45+
46+
@Email
47+
private EditText etEmail;
48+
49+
@Name
50+
private EditText etName;
51+
52+
@Password
53+
private EditText etPassword;
54+
55+
@Override
56+
protected void onCreate(Bundle savedInstanceState) {
57+
super.onCreate(savedInstanceState);
58+
setContentView(R.layout.activity_main);
59+
60+
etEmail = (EditText) findViewById(R.id.edEmail);
61+
etName = (EditText) findViewById(R.id.edName);
62+
etPassword = (EditText) findViewById(R.id.edPassword);
63+
64+
65+
// Write this two line after all views are bind
66+
Validator validator = new Validator();
67+
validator.Validator(this);
68+
69+
70+
## **License**
71+
The MIT License (MIT)
72+
73+
Copyright 2017 Harpreet Singh
74+
75+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
76+
77+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
78+
79+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
80+
81+
## **Contact Us**
82+
83+
Personal : [Website](http://www.harpz.890m.com/)

0 commit comments

Comments
 (0)