Added validation function for patterns
Added validation function for patterns
Written and tested the establishment measure for patterns