com.vaadin.flow.component.shared.

Class HasClientValidation.ClientValidatedEvent

    • Constructor Detail

      • ClientValidatedEvent

        public ClientValidatedEvent(Component source,
                                    boolean fromClient,
                                    @EventData(value="event.detail.valid")
                                    boolean valid)

        Creates a new event using the given source.

        Parameters:

        source - the source component.

        fromClient - true if the event originated from the client side, false otherwise

        valid - whether the client-side validation succeeded.

      • ClientValidatedEvent

        public ClientValidatedEvent(Component source,
                                    boolean fromClient)

        Creates a new event using the given source. This constructor should be used when creating the event on the server-side.

        Parameters:

        source - the source component.

        fromClient - true if the event originated from the client side, false otherwise

    • Method Detail

      • isValid

        public Boolean isValid()

        Returns true if the client-side validation succeeded and false otherwise.

        Note, this method will always return true if the event originated from the server-side i.e. ComponentEvent.isFromClient() returns false.

        Returns:

        whether the client-side validation succeeded.