fixed validation by swapping the order of trim and strtolower
trimmed the shortname before saving