Skip to content

Conversation

NishkalankBezawada
Copy link
Contributor

Q A
Bug fix? [x]
New feature? [ ]
New sample? [ ]
Related issues? fixes #1592

What's in this Pull Request?

Fix for issue #1592

Problem

The number validations are working like a charm, but if we are using a percentage column and trying to save the value to that column, it is not saving the values. Below is the screen for the validations

image

Steps to Reproduce

  1. Add field Number and choose as 'Show as percentage'
  2. Use this list in Dynamic form, with New Item, and give the value as 15 and click save
    The form will not be saved.

Solution

The properties number field if chosen as 'Shown as percentage', the minimum and maximum values will be retrieved as below,

image

wherein, the properties of number field without choosing 'Show as percentage', the minimum and maximum values will be retrieved as below.

image

And at onSubmitClick, the validation for percentage column is failing due to the minimum and maximum values for the percentage column.

image

While validating a number, the percentage column is validated as below,
image

While onSubmit the same validation for the percentage column is not done, instead, the minimum value and maximum value is checked with the default values as 0.1 and 1 respectively.

So, a new method is introduced to check the validation again while the user is submitting the form as below,
image

Thanks,
Nishkalank

@michaelmaillot
Copy link
Collaborator

Hi @NishkalankBezawada,

Thanks for this fix!

I've requested a few little things to update, can you have a look at them?

@NishkalankBezawada
Copy link
Contributor Author

Hi @NishkalankBezawada,

Thanks for this fix!

I've requested a few little things to update, can you have a look at them?

Hey @michaelmaillot

Sure thing, I'll do it early tomorrow in the morning 😊

Thanks for the review.
Nishkalank

@michaelmaillot michaelmaillot merged commit 25aae4b into pnp:dev Sep 25, 2023
@michaelmaillot
Copy link
Collaborator

Merged manually.

Thank you @NishkalankBezawada!

@michaelmaillot michaelmaillot added this to the 3.16.0 milestone Sep 25, 2023
@NishkalankBezawada
Copy link
Contributor Author

Merged manually.

Thank you @NishkalankBezawada!

Thanks a lot @michaelmaillot

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.

2 participants