Validation on name

Fixed a stupid bug in isNumeric and did some code which need to be more
nicer for validatation.