Added form validation.
Fixed bug in reading the required property value.