UrlName & NiceName coding rules

voleninvolenin Registered Users Posts: 3 Beginner grinner
Does anyone know where to get validation rules for UrlName attribute (for creating Folders), as well as NiceName (for creating Albums)? I tried to reverse engineer JavaScript on smugmug website, but it seems like all validation rules are done on the backend and frontend only has 'limited' version of them (which is used to automatically populate 'UrlName' field as you are typing in folder Name).

Thanks,

Vlad

Comments

  • gabbiegabbie Registered Users Posts: 66 Many Grins
    edited January 15, 2015
    Hi Vlad! I'm assuming that you're working with API 2.0? The rules around UrlName and NiceName are a little complex, so let me explain. NiceName is deprecated, so while you can still use it on endpoints that have it, it's better to use the UrlName attribute everywhere. On endpoints that do have both UrlName and NiceName, you can use either, but only one at a time. If you specify something for both, you'll get an error. In both cases, the validation rules are that your name must be uppercased, no more than 32 characters long, and you should represent spaces with a hyphen.
    gabbie
    SmugMug Product Manager
Sign In or Register to comment.