fixed up truncate, cap etc. and greyed out if invalid characters entered