Copied to clipboard

Flag this post as spam?

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


  • Steffen Agger 13 posts 34 karma points
    Oct 13, 2010 @ 14:58
    Steffen Agger
    0

    Mandatory & DefaultValue

    When creating a 'Mandatory' input with a 'DefaultValue' the validation on this said input "dies", because the the validation only checks for an empty field, right?

    To the developers: Is the 'InitialValue' property on the 'mandatory'-RequiredValidator set equal to the 'DefaultValue'?

     

    I've also created the following entry on codeplex: http://umbraco.codeplex.com/workitem/29159 (don't know if that's the way to do it..?)

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Oct 13, 2010 @ 18:22
    Sebastiaan Janssen
    0

    As a workaround for now you could add a regex check instead of mandatory and check that the entered value does not equal the defaultvalue.

  • Steffen Agger 13 posts 34 karma points
    Oct 20, 2010 @ 09:56
    Steffen Agger
    0

    Thanks for the reply Sebastiaan, but the regex check is not really an option.

    First off, the regex seems dodgy, only firing right some times (don’t know if cache was a factor here). Second, the regex validation seems to fire at page load (if the field is not empty), so the “form” inits with errors. Third, the guy meant to maintain these contour-forms, from the backend, doesn’t know regex.

    Could a contour-developer check this out, it's a pretty standard functionality?

    If I've missed a way to hook into the repeater handling the fields, and set the InitialValue equal the DefaultValue - let me know, but as I see it, it's a fix the development team has to make.

    (i'm a bit stuck atm)

Please Sign in or register to post replies

Write your reply to:

Draft