revised validation code to leverage rails and changed related css on user views