Add trim() to deal with meaninless spaces in required.