Subversion Repositories SmartDukaan

Rev

Rev 832 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 832 Rev 839
Line 79... Line 79...
79
						boolean invalidInput = false;
79
						boolean invalidInput = false;
80
						if (!Utils.validatePin(this.pincode)) {
80
						if (!Utils.validatePin(this.pincode)) {
81
							addActionError("Invalid pincode.");
81
							addActionError("Invalid pincode.");
82
							invalidInput = true;
82
							invalidInput = true;
83
						}
83
						}
84
						if (!Utils.validatePin(this.phone)) {
84
						if (!Utils.validatePhone(this.phone)) {
85
							addActionError("Invalid phone number.");
85
							addActionError("Invalid phone number.");
86
							invalidInput = true;
86
							invalidInput = true;
87
						}
87
						}
88
						if (this.line1.isEmpty()) {
88
						if (this.line1.isEmpty()) {
89
							addActionError("Address line1 is empty.");
89
							addActionError("Address line1 is empty.");
Line 92... Line 92...
92
						if (this.city.isEmpty()) {
92
						if (this.city.isEmpty()) {
93
							addActionError("City name is empty.");
93
							addActionError("City name is empty.");
94
							invalidInput = true;
94
							invalidInput = true;
95
						}
95
						}
96
						if (this.state.isEmpty()) {
96
						if (this.state.isEmpty()) {
97
							addActionError("City name is empty.");
97
							addActionError("State name is empty.");
98
							invalidInput = true;
98
							invalidInput = true;
99
						}
99
						}
100
						if (invalidInput) {
100
						if (invalidInput) {
101
							return "redirect";
101
							return "redirect";
102
						}
102
						}