Fixed Unexpected token A on validation errors