flow-components icon indicating copy to clipboard operation
flow-components copied to clipboard

Improve JavaDoc to explain field constraint validation

Open vursen opened this issue 6 months ago • 0 comments

What to improve

  • For each component individually, give a general description of how the constraint validation works, including such aspects as validation triggers, value change modes, constraints, error messages, Binder, manual validation.
  • For setErrorMessage, mention i18n as the means for setting distinct error messages.
  • For setErrorMessage, explain that the error message will be only displayed when the field is invalid.
  • For EmailField, clarify that setPatternErrorMessage overrides the default email format rather than adding anything on top.
  • For constraint methods like setMin, setMinLength, etc, mention that they are inclusive.

Based on DX test findings.

Components

  • DatePicker
    • https://github.com/vaadin/flow-components/pull/6537
  • TimePicker
    • https://github.com/vaadin/flow-components/pull/6537
  • DateTimePicker
    • Its validation is currently working differently from other components because it wasn't included in the refactor removing the validated event dependency. So, it makes sense to ignore it until its behavior is aligned
  • TextField
    • https://github.com/vaadin/flow-components/pull/6544
  • PasswordField
    • https://github.com/vaadin/flow-components/pull/6544
  • EmailField
    • https://github.com/vaadin/flow-components/pull/6544
  • TextArea
    • https://github.com/vaadin/flow-components/pull/6544
  • NumberField
    • https://github.com/vaadin/flow-components/pull/6586
  • IntegerField
    • https://github.com/vaadin/flow-components/pull/6586
  • BigDecimalField
    • https://github.com/vaadin/flow-components/pull/6586
  • Checkbox
    • https://github.com/vaadin/flow-components/pull/6595
  • CheckboxGroup
    • https://github.com/vaadin/flow-components/pull/6595
  • Select
    • https://github.com/vaadin/flow-components/pull/6595
  • RadioButtonGroup
    • https://github.com/vaadin/flow-components/pull/6595
  • ComboBox
    • https://github.com/vaadin/flow-components/pull/6595
  • MultiSelectComboBox
    • https://github.com/vaadin/flow-components/pull/6595

Part of #4618

vursen avatar Aug 14 '24 14:08 vursen