Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide an example of PersonProperties.telephoneFormat #51

Closed
nkelsa1 opened this issue Oct 28, 2015 · 3 comments
Closed

Please provide an example of PersonProperties.telephoneFormat #51

nkelsa1 opened this issue Oct 28, 2015 · 3 comments

Comments

@nkelsa1
Copy link

nkelsa1 commented Oct 28, 2015

Please can you provide an example of how to use the PersonProperties.telephoneFormat? I am looking for an 11 digit number starting with 0.

Thanks

@mariuszs
Copy link
Member

Try with something like this:

import io.codearte.jfairy.Fairy
import io.codearte.jfairy.producer.person.PersonProperties

Fairy fairy = Fairy.create(Locale.forLanguageTag("en"))
Person customPerson = fairy.person(PersonProperties.telephoneFormat("0###########"))
println customPerson.fullName() + " : " + person.telephoneNumber()

Result:

Xavier Fernandez : 091292276891

@nkelsa1
Copy link
Author

nkelsa1 commented Oct 29, 2015

Thanks Mariusz,

I'll give it a try.

Does jfairy support all locale language or just a subset?

Thanks

On Thu, Oct 29, 2015 at 1:01 PM, Mariusz Smykuła notifications@github.com
wrote:

Try with something like this:

import io.codearte.jfairy.Fairy
import io.codearte.jfairy.producer.person.PersonProperties

def fairy = Fairy.create(Locale.forLanguageTag("en"))
def person = fairy.person(PersonProperties.telephoneFormat('"0###########"'))
println person.fullName() + " : " + person.telephoneNumber()

Result:

Olivia Ford : "025527042802"


Reply to this email directly or view it on GitHub
https://github.com/Codearte/jfairy/issues/51#issuecomment-152173356.

@mariuszs
Copy link
Member

We have suppoort for subset, please take look at:

https://github.com/Codearte/jfairy/tree/master/src/main/resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants