Alias - (0, 100]
URI - [0, 1000]
NRS
if(aliasValue.length() != 0 && aliasValue.length() <= 100) {
alias = aliasValue.toLowerCase();
for(i = 0; i < alias.length() && "0123456789abcdefghijklmnopqrstuvwxyz".indexOf(alias.charAt(i)) >= 0; ++i) {;}
if(i != alias.length()) {
responses.put("errorCode", Integer.valueOf(4));
responses.put("errorDescription", "Incorrect \"alias\" (must contain only digits and latin letters)");
} else {
uri = uri.trim();
if(uri.length() > 1000) {
responses.put("errorCode", Integer.valueOf(4));
responses.put("errorDescription", "Incorrect \"uri\" (length must be not longer than 1000 characters)");
} else {
...
} else {
responses.put("errorCode", Integer.valueOf(4));
responses.put("errorDescription", "Incorrect \"alias\" (length must be in [1..100] range)");
}
Thanks for this info!