add trim for JS Validation