Skip to content

RichTextEditor() binder.asRequired fail #7367

@sveinnetnordic

Description

@sveinnetnordic

Description

Works initial if empty. When text is removed it does not work.

See: vaadin/web-components#8453

Expected outcome

Should validate

Minimal reproducible example

Add text, and remove

binder.forField(contentRte)
    .asRequired(translate("entity.validation.required")) //FAILS, See: https://github.com/vaadin/web-components/issues/8453
    .withValidator({ !contentRte.isEmpty }, translate("entity.validation.required"))
    .withStatusLabel(contentRteStatusLabel)
    .bind({ it.admissionEmailDTO.content }, { o, v -> o.admissionEmailDTO.content = v })

Steps to reproduce

see above

Environment

Hilla: 24.7.0.beta1
Flow: 24.7.0.beta1
Vaadin: 24.7.0.beta1
Spring Boot: 3.4.1
Spring: 6.2.1
Spring Security: ☑
Spring Data JPA: ☑
Copilot: 24.7.0.beta1
Frontend Hotswap: Disabled, using pre-built bundle
OS: amd64 Windows 11 10.0
Java: JetBrains s.r.o. 21.0.5
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Java Hotswap: Java Hotswap is enabled
IDE Plugin: 1.4.8 IntelliJ

Browsers

No response

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