A category on NSString for checking validity and transforming strings