As someone mentioned in the comments on your question, a RegEx would probably be the simplest way to evaluate the input
if (Regex.IsMatch("yourtexthere", "^[a-zA-Z]{1,25}$").Success) {
// it matches
}
That should give you a good idea of how to accomplish it