cakephp / localized

I18n and L10n related CakePHP code
Other
214 stars 179 forks source link

Include a localized 'date' and 'number' rules to ValidationInterface #186

Closed CauanCabral closed 3 years ago

CauanCabral commented 6 years ago

I know we can pass format to date method in Validation lib, but I think we can help newcomers adding all of widely used data types (like date and decimals) with different formats in differents countrys to that lib.

So, would do you think be nice to provide a 'date' and 'number' validation rule with default normalized format?

CauanCabral commented 6 years ago

I can do a PR if are some interest

dereuromark commented 4 years ago

This would be the time now to support any changes to the interfaces as PR. Before we release RC and stable for the Cake4 version.

CauanCabral commented 4 years ago

Thanks, I'll begin that today.

CauanCabral commented 4 years ago

Thinking about how to implement the localized rules for date/decimal.

Should I require extension intl and re-implement some of parser routines from Cake\I18n or add Cake\I18n as a requirement of this plugin?

dereuromark commented 4 years ago

Neither. If people are using the the validation part here, they will already have those requirements met.

If this plugin needs those, then require-dev would suffice.

CauanCabral commented 4 years ago

Working on that feature, I found a bug/not expected behavior on Cake\I18n. Now, should I wait for a fix or try another path?

Also, opened a PR to expose my thoughts - review/suggestions are welcome.