validate name and resize picture