Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • alimac 182 posts 370 karma points
    Oct 06, 2020 @ 22:53

    Validation for custom backoffice forms

    I've created a custom section in my Umbraco back-end, and I'm trying to create some forms to capture data however I've been unable to fully understand how the umbraco directives work when it comes to validation.

    As an example, I'm trying to capture some basic data and save it using the following:

    <form name="myForm">
        <umb-property property="">
                <umb-property-editor model=""></umb-property-editor>
        <umb-button type="button"

    And in my controller:

    $scope.form: {  
        properties: {    
                name: {
                        alias: 'name',
                        label: 'Display name',
                        description: '',
                        value: '',
                        view: 'textbox',
                        validation: {
                                mandatory: true

    I would have thought the 'validation' property would be where I can set the validation necessary on the property, however that doesn't seem to be the case. All that seems to do is highlight the property with a red asterix to indicate it's required rather than do any validation.

    I've taken a look at the backoffice documentation here however it's unfortunately lacking any code examples and I'm puzzled how this is supposed to work.

    I've looked at the other sections, particularly the create user form to see if I can pick anything up there but the only thing I've noticed is the 'valFormManager' directive which may be involved somehow.

    I've also tried the obvious things like putting ng-required on the editor and property but neither has done the trick.

    Is there any documentation for any of this? It's quite frustrating trying to work out how it's all supposed to work!


  • alimac 182 posts 370 karma points
    Oct 08, 2020 @ 07:53

    Just as an update, in case anyone finds themselves in a similar situation: I'm just having to write my forms manually as there doesn't seem to be sufficient documentation to use Umbraco's existing components.

Please Sign in or register to post replies

Write your reply to: