How can I take from Property settings the validation? I created a new document types and I wrote there regex and I want take the regex from UmbracoApiController I have the content from this page
IContent content = Services.ContentService.GetById(pageId);
But I don't found the validation object:
EDIT
I found the result:
var contentType = ApplicationContext.Current.Services.ContentTypeService.GetContentType(contentTypeId);
List<PropertyTypeCollection> propertyGroups = contentType.PropertyGroups.Select(s=>s.PropertyTypes).ToList();