Copied to clipboard

Flag this post as spam?

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


  • Leena 29 posts 100 karma points
    Apr 05, 2013 @ 09:21
    Leena
    0

    localize validation message

    Hi,

    I still can not find a way to use the U6 embedded dictionary to localize forms validation Message texts...

    Here is the actual version, from a Model cs file.

    class myFormModel
    {
           
    [Required(ErrorMessage="Please enter your name")]
           
    public string FirstName { get; set; }
    }

    How to localize that "Please enter your name" ?? 

    if I am doing

            [Required(ErrorMessageResourceName=umbraco.library.GetDictioanyItem("InvalidName"))]

    Its giving me compilation error  - An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type.

    I am using Umbraco 6.0

     

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Apr 05, 2013 @ 10:31
    Dave Woestenborghs
    1

    This is actually a "bug" in the framework. I created a issue for it.

    More information can be found in this post : http://our.umbraco.org/forum/templating/templates-and-document-types/39555-Surface-controller-and-data-annotations

  • Leena 29 posts 100 karma points
    Apr 05, 2013 @ 13:19
    Leena
    0

    ok .. thanks for reply Dave.

Please Sign in or register to post replies

Write your reply to:

Draft