validating dot
changing the behaviour when the user press dot