trim trailing whitespaces

PR for https://github.com/jzaefferer/jquery-validation/issues/970