I noticed in a few places there's a reference to val-property-validator. It seems to take a JS function. I assume the function needs to return a properly formatted response:
There's mention that the ng-required directive works OOTB too, without any need of the custom javascript function above.
I apologize for not testing this before commenting. I'm not exactly sure where these directives need to be placed in the code above and I have a few deadlines. Hopefully someone else can jump in to help get you across the finish line!
I will look at the links sent and can post my controller code if anyone needs it. The editor displays with data from a database but deleting the text never really fires any validation message.
Add properties to custom section v8
Hi,
I'm building a section where I want to add Umbraco properties and custom properties to my view. (in Umbraco v8)
I read and implemented code from the following code: http://www.enkelmedia.se/blogg/2013/12/4/umbraco-7-use-the-rich-text-editor-tinymce-in-a-custom-section/
Though when I try to load the property I get the following result on the page:
And the following browser console error:
My code: HTML
JS
Anyone able to help me out adding textstring fields (or any other type of field I can use as an example) to my section?
Hey mate! Sorry nobody ever responded to this.
I ran into your post while searching for help with this exact issue.
The following update to your HTML should do the trick:
In the code above, I've added
val-form-manager
as an attribute to<ng-form>
.I have the above code and i can see the editor in my custom section.
Did anyone figure out how to make this editor validate so if no text is entered it throws an error?
Cant find any documentation to configure this.
Thanks
I noticed in a few places there's a reference to
val-property-validator
. It seems to take a JS function. I assume the function needs to return a properly formatted response:Here's one example of HTML for the eyedropper, and its validation function.
There's mention that the
ng-required
directive works OOTB too, without any need of the custom javascript function above.I apologize for not testing this before commenting. I'm not exactly sure where these directives need to be placed in the code above and I have a few deadlines. Hopefully someone else can jump in to help get you across the finish line!
Thanks Mark!
I have the below code which doesnt work but like you say hopefully someone could jump in and assist
I will look at the links sent and can post my controller code if anyone needs it. The editor displays with data from a database but deleting the text never really fires any validation message.
Thanks again
is working on a reply...