Adding pattern attribute support

Auto validating elements with pattern attribute.