Fix validation error when form item not is required

If form item is added between load and post, and its not required, don't add errorMessage

Also did some code formatting changes