-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hello,
I'm new to ValueOf so this may be a basic question, but it there a way of creating an object with alternative data formats? For example I would like to represent a telephone number as a long, but I also want to be able to create the object using a string.
So I would like to accept:
1234567890 (long)
But I would also like to create the object using
(123)456-7890 (string)
or 123-456-7890 (string)
or +1 123-45-6789 (string).
In all cases, the actual data would be represented as a long.
I realize that I'm supposed to create the object using TelephoneNumber.From(1234567890)
but can I have the alternate constructors?
Thank you
Metadata
Metadata
Assignees
Labels
No labels