form validation example and for each and truncate