Copied to clipboard

Flag this post as spam?

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


  • Erma Isabel 20 posts 91 karma points
    Dec 10, 2013 @ 10:43
    Erma Isabel
    0

    Numeric Datatype doesn't allow to add zeros in the beginning of number.

    Hi all,

    I am using numeric datatype for phone numbers. It isn't allowing me to save zeros (not all zeros just the ones in the begining) in numbers like "09866500599". The field omits 0 and only rest (ie, "9866500599") getting saved in the umbraco content.

    How can i solve this?

    Or is there any other datatype, that allows me to include zeros in front as well as perform numeric validation?

    Please help, Thanks.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Dec 10, 2013 @ 10:58
    Stefan Kip
    1

    A true number (Integer) doesn't start with a leading zero. Therefor a phone number is not the same as a number.
    Just use the Textstring with Regex validation :-)

  • Erma Isabel 20 posts 91 karma points
    Dec 10, 2013 @ 11:04
    Erma Isabel
    0

    Thanks for your reply,

    Can you provide any sample how to create datatype with Regex validation? Because i am not sure how to do that. :-(

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Dec 10, 2013 @ 11:05
    Stefan Kip
    0

    Just add a property to the document type with type Textstring and add a regex rule in the regex textarea.

  • Erma Isabel 20 posts 91 karma points
    Dec 10, 2013 @ 11:23
    Erma Isabel
    0

    It worked. Thank you so much. :-)

  • 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