Skip to content

sample Data invalid when using range validatorΒ #12

@discochance

Description

@discochance

Describe the bug
When using concerto-ui with models which are using range validators in their Models, Sample Data isn't provided correctly

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://concerto-ui.netlify.com/
  2. Change the 'FragileGoodsClause' to i.e.
asset FragileGoodsClause extends AccordContract {
  o AccordParty buyer
  o AccordParty seller
  o MonetaryAmount deliveryPrice
  o Double accelerationMin range=[0.0,10.0]
  o Double accelerationMax
  o MonetaryAmount accelerationBreachPenalty
  o Duration deliveryLimitDuration
  o MonetaryAmount lateDeliveryPenalty
}
  1. Select FragileGoodsClause in the Declaration Selection
  2. Inspect the form and its default Values

Expected behavior
Default Values which fit the validators OR at least default values in all fields without validators

Screenshots
grafik

Desktop (please complete the following information):

  • Browser Firefox
  • Version 74.0

Additional Context
The console shows an error similar to the following one:
Error: "Validator error for field org.accordproject.cicero.contract.AccordParty#6280 io.clause.demo.fragileGoods.FragileGoodsClause.accelerationMin: Value is outside upper bound 207.253"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions