use <span to replace <input>>
refactor validateRequired()
use oo to refactor code
use oo to refactor code