CZERTAINLY / CZERTAINLY-FE-Administrator

CZERTAINLY - administrator user interface
https://www.czertainly.com
MIT License
6 stars 12 forks source link

Attribute constraint validation of type RANGE does not work #734

Closed 3keyroman closed 2 months ago

3keyroman commented 3 months ago

Describe the bug New data attribute for the network discovery of certificates that is used to define number of parallel executions is using constraint of type RANGE, according to the documentation: https://docs.czertainly.com/docs/contributors/attributes/constraints.

However, the validation does not work on the FE. When the number is set out of range, it is still considered as valid input. Such discovery can be created, and the BE will respond that the value is not allowed.

I consider this as a bug on the FE that does not properly validate constraints.

To Reproduce Steps to reproduce the behavior:

  1. Go to Discoveries
  2. Create new discovery based on Network Discovery Provider
  3. Select IP-Hostname kind to load attributes
  4. Provide invalid input for Number of parallel executions attribute
  5. The input field is green, meaning that it is considered as valid

Expected behavior The range should be validated, and if the value is out of range, the error message from the constraint should be shown. The FE should not allow create request with invalid input.

Screenshots

Screenshot 2024-07-24 at 9 22 18 Screenshot 2024-07-24 at 9 22 39

Additional context Using latest FE version compatible with 2.12.0.