Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Validation for `email` field on Customer create and update endpoints using RFC-compliant e-mail format checks.

### Changed
- Updated README with details of the new validation rule.

### Breaking
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading ### Breaking deviates from the Keep-a-Changelog convention used elsewhere in the file (e.g. ### Added, ### Changed).

To remain consistent and to make automatic changelog parsers work correctly, please rename this section to ### Breaking Changes or ### Removed (depending on policy), or alternatively move the note under a standard ### Changed section with a BREAKING CHANGE: prefix.

- Requests that provide an **invalid e-mail** for the `email` property will now be rejected with **HTTP 400** validation errors. Client integrations must supply a properly formatted e-mail or omit the field.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,17 @@ This project is licensed under the **Apache License 2.0** – see the [LICENSE](
* Generated with [Amplication](https://amplication.com) – an open-source platform for building Node.js applications.
* Built with amazing open-source software:
* [NestJS](https://nestjs.com) • [Prisma](https://www.prisma.io) • [React](https://react.dev) • [React-Admin](https://marmelab.com/react-admin/) • and many more.

---

## API Changes

### Customer Email Validation (Unreleased)

Starting from the **next release** the `email` field on the *Customer* entity is **validated for correct e-mail format** on both *create* and *update* endpoints.

* The field remains **optional** – omitting it is still allowed.
* When supplied, the value must conform to a valid e-mail address format (RFC 5322).
Requests with an invalid e-mail now respond with **HTTP 400 – Bad Request** containing a validation error message.

> ⚠️ This is a **breaking change** for clients that previously sent non-email values (e.g. usernames, phone numbers, etc.) in the `email` property. Ensure client applications are updated accordingly.
Loading