concept ISBN code in category cloud
appears as: ISBN code, n ISBN code

This is an excerpt from Manning's book Cloud Native Spring in Action.
Listing 3.8. The Book class with validation constraints defined for each field.
package com.polarbookshop.catalogservice.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.PastOrPresent; import javax.validation.constraints.Pattern; import java.time.Year; public class Book { @NotBlank(message = "The book ISBN must be defined.") @Pattern(regexp = "^(97([89]))?\\d{9}(\\d|X)$", message = "The ISBN format must follow the standards ISBN-10 or ISBN-13.") #1 private String isbn; @NotBlank(message = "The book title must be defined.") #2 private String title; @NotBlank(message = "The book author must be defined.") private String author; @PastOrPresent(message = "The book cannot have been published in the future.") #3 private Year publishingYear; // Rest of the class }