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?
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 :-)
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.
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 :-)
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. :-(
Just add a property to the document type with type Textstring and add a regex rule in the regex textarea.
It worked. Thank you so much. :-)
is working on a reply...