Added isValid function in view_field. Changes done to add custom validation. Fixed checkbox issue related to required attribute.

Changes done to fix checkbox(required) issue