mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Provide better error message for abuse contact phone number
Make it clear that all the user need to do to rectify is to provide a phone number ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=153191178
This commit is contained in:
parent
db2f08633a
commit
fb25b625f3
2 changed files with 6 additions and 5 deletions
|
@ -286,7 +286,8 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||||
&& !any(newContactsByType.get(type), HAS_PHONE)) {
|
&& !any(newContactsByType.get(type), HAS_PHONE)) {
|
||||||
throw new ContactRequirementException(
|
throw new ContactRequirementException(
|
||||||
String.format(
|
String.format(
|
||||||
"At least one %s contact must have a phone number", type.getDisplayName()));
|
"Please provide a phone number for at least one %s contact",
|
||||||
|
type.getDisplayName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,8 +125,8 @@ public class ContactSettingsTest extends RegistrarSettingsActionTestCase {
|
||||||
"op", "update",
|
"op", "update",
|
||||||
"args", reqJson));
|
"args", reqJson));
|
||||||
assertThat(response).containsEntry("status", "ERROR");
|
assertThat(response).containsEntry("status", "ERROR");
|
||||||
assertThat(response).containsEntry("message", "At least one "
|
assertThat(response).containsEntry("message", "Please provide a phone number for at least one "
|
||||||
+ RegistrarContact.Type.TECH.getDisplayName() + " contact must have a phone number");
|
+ RegistrarContact.Type.TECH.getDisplayName() + " contact");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -149,7 +149,7 @@ public class ContactSettingsTest extends RegistrarSettingsActionTestCase {
|
||||||
"op", "update",
|
"op", "update",
|
||||||
"args", reqJson));
|
"args", reqJson));
|
||||||
assertThat(response).containsEntry("status", "ERROR");
|
assertThat(response).containsEntry("status", "ERROR");
|
||||||
assertThat(response).containsEntry("message", "At least one "
|
assertThat(response).containsEntry("message", "Please provide a phone number for at least one "
|
||||||
+ RegistrarContact.Type.ABUSE.getDisplayName() + " contact must have a phone number");
|
+ RegistrarContact.Type.ABUSE.getDisplayName() + " contact");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue