def validation_class(answer_sheet)
      validation = ''
      validation += ' required' if self.required?(answer_sheet)
      # validate-number, etc.
      validate_style = ['number', 'currency-dollar', 'email', 'url', 'phone'].find {|v| v == self.style }
      if validate_style
        validation += ' validate-' + validate_style
      end
      validation
    end
def validation_class(answer_sheet)
      validation = ''
      validation += ' required' if self.required?(answer_sheet)
      # validate-number, etc.
      validate_style = ['number', 'currency-dollar', 'email', 'url', 'phone'].find {|v| v == self.style }
      if validate_style
        validation += ' validate-' + validate_style
      end
      validation
    end
css class names for javascript-based validation