Skip to content
Snippets Groups Projects
Commit bf42d117 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

trimming too long phone numbers added

parent 94972bd7
No related branches found
No related tags found
1 merge request!1Appointments dev
...@@ -271,7 +271,11 @@ public class Subject { ...@@ -271,7 +271,11 @@ public class Subject {
* @see #phone1 * @see #phone1
*/ */
public void setPhone1(String phone1) { public void setPhone1(String phone1) {
this.phone1 = phone1; if (phone1.length() > 20) {
logger.warn("Invalid phone. Ignoring: " + phone1);
} else {
this.phone1 = phone1;
}
} }
/** /**
...@@ -288,7 +292,11 @@ public class Subject { ...@@ -288,7 +292,11 @@ public class Subject {
* @see #phone2 * @see #phone2
*/ */
public void setPhone2(String phone2) { public void setPhone2(String phone2) {
this.phone2 = phone2; if (phone2.length() > 20) {
logger.warn("Invalid phone. Ignoring: " + phone2);
} else {
this.phone2 = phone2;
}
} }
/** /**
...@@ -305,7 +313,11 @@ public class Subject { ...@@ -305,7 +313,11 @@ public class Subject {
* @see #phone3 * @see #phone3
*/ */
public void setPhone3(String phone3) { public void setPhone3(String phone3) {
this.phone3 = phone3; if (phone3.length() > 20) {
logger.warn("Invalid phone. Ignoring: " + phone3);
} else {
this.phone3 = phone3;
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment