Copied to clipboard

Flag this post as spam?

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


  • Evan Jardine 108 posts 168 karma points
    Aug 31, 2009 @ 07:19
    Evan Jardine
    0

    Node Name Validation?

     

    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p {mso-style-noshow:yes; mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

    Hi All

    Just wondering if it is possible to limit users on what they can enter for a nodename?

    I have a few users that are writing a short story every time they create a new node and would particularly like to restrict the characters length.

    Cheers

    Evan

  • Evan Jardine 108 posts 168 karma points
    Aug 31, 2009 @ 07:20
    Evan Jardine
    0

    Opps...sorry, pasted text from office..

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 31, 2009 @ 08:27
    Dirk De Grave
    0

    Hi Evan,

    Don't think there's currently a limitation on number of chars, but you may find the dialog for creating a new node and add some jquery to it to limit the number of chars in a textbox, right? You'll find multiple examples on the web.

     

    Cheers,

    /Dirk

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Aug 31, 2009 @ 09:11
    Niels Hartvig
    2

    Tim has made one - or at least got pointers to one:
    http://www.nibble.be/?p=62

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 31, 2009 @ 11:46
    Thomas Höhler
    1

    You can also use an action handler (BeforePublishHandler) which checks the char length and on failure it doesn't allow to publish only saving.

    hth,
    Thomas

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Aug 31, 2009 @ 13:34
  • Roel 151 posts 305 karma points
    Sep 01, 2009 @ 07:53
    Roel
    0

    Also check out the Document.BeforeSave event, it doesn't work in the current Umbraco versoin (4.0.2.1) But according to Aaron (Slace) this bug should be fixed in the 4.1 release: http://www.aaron-powell.com/blog/august-2009/umbraco-41-alpha-release.aspx

  • Evan Jardine 108 posts 168 karma points
    Sep 03, 2009 @ 00:48
    Evan Jardine
    0

    Thanks for the help.  I've been out of action for a few days so I'll start trying some of the suggestions today.

    Cheers

    Evan

  • Evan Jardine 108 posts 168 karma points
    Sep 03, 2009 @ 07:21
    Evan Jardine
    0

    I am still looking at all of these options but I have found a simple solution based on what Dirk said.

    I found the Create dialog for content, /umbraco/create/content.ascx

    Then added an asp:RegularExpressionValidator to it with a RegEx to limit the number of characters.

    Thanks for the Help

    Cheers

    Evan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies