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

add birthdate validation in Pet Controller #1284

Closed

Conversation

4313testing
Copy link

adding birthdate for update and create Pet

@@ -6,3 +6,4 @@ nonNumeric=darf nur numerisch sein
duplicateFormSubmission=Wiederholtes Absenden des Formulars ist nicht erlaubt
typeMismatch.date=ung�ltiges Datum
typeMismatch.birthDate=ung�ltiges Datum
invalid.date=Ongeldige geboortedatum. Selecteer alstublieft een geldige datum.
Copy link
Member

Choose a reason for hiding this comment

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

This isn't German.

Copy link
Author

Choose a reason for hiding this comment

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

german message is fixed now !

@@ -107,6 +112,18 @@ public String initUpdateForm(Owner owner, @PathVariable("petId") int petId, Mode

@PostMapping("/pets/{petId}/edit")
public String processUpdateForm(@Valid Pet pet, BindingResult result, Owner owner, ModelMap model) {

if (StringUtils.hasLength(pet.getName()) && pet.isNew() && owner.getPet(pet.getName(), true) != null) {
Copy link
Member

@dsyer dsyer Jul 10, 2023

Choose a reason for hiding this comment

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

Is this necessary - it's not a new pet, so the test will always fail?

Copy link
Author

Choose a reason for hiding this comment

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

you are correct this was not there in the latest version .
sorry i maybe i added it by mistake
its fixed now in the new commit

@dsyer
Copy link
Member

dsyer commented Jul 10, 2023

Can you please squash everything down to one commit and rebase on main? Also take a look at the build failures and take the actions suggested (before you squash).

@dsyer dsyer closed this Jul 10, 2023
@dsyer dsyer reopened this Jul 10, 2023
@dsyer
Copy link
Member

dsyer commented Jul 10, 2023

Merged as 3be2895

@dsyer dsyer closed this Jul 10, 2023
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

Successfully merging this pull request may close these issues.

3 participants