Brage Sekse Aarset

Results 177 comments of Brage Sekse Aarset

One step at a time, I say. PhoneNumber seems like a good place to start. Would you like to take a stab at adding the phone number validation regex?

Similar issue experienced downsteam in `class-validator`, as well https://github.com/typestack/class-validator/issues/1707

This project includes only three levels of geographical information: Country, state and city. Obviously each country separates itself into organizational or historical units in many different ways, and it's not...

> @braaar Thanks for your suggestion. Really appreciate. 🙇🏼‍♂️ > > I liked your suggestions. Obviously, it's quite time-consuming with the SQL updates. > > I think if we're going...

`IsDateString` is an alias for `Is8601`, which matches the [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601). Have you tried `IsDate`?

> > `IsDateString` is an alias for `Is8601`, which matches the [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601). Have you tried `IsDate`? > > I had to change it to `IsISO8601` while someone...

If I understand this correctly, you could end up with a lot of different objects (or empty arrays) in your array, and you want to make sure that they are...

I still think there is a legitimate issue here. It doesn't seem intuitive or practical that `ValidateNested` accepts empty arrays.

I think the issue is twofold: 1. It's not nice that empty arrays are accepted by `ValidateNested`. There should at least be an option to disable that behaviour or something....

If you take a look at [the source code for this decorator](https://github.com/typestack/class-validator/blob/develop/src/decorator/string/IsPhoneNumber.ts), you can see that the package `libphonenumber-js` is used. You can take a look at `libphonenumber-js` [on npm](https://www.npmjs.com/package/libphonenumber-js)...