Fixed category bugs

reverted maxlength to 19 so that 21 characters could not be inputted.
Added events to handle removing alert messages when the user fixes
errors