I have a component that contains a field like so,

Vendor.class

@InjectComponent
@Parameter
private Field vendorName;

I have a page class like so,

Page.class

@Property
private Field vendorName;

onValidateFromForm() {

//I would like to do some serverside validation and return the error back
to the field, but I'm not sure how to connect the field in the component
with the page class.

    if(condition == true) {
        form.recordError(vendorName, "some error message");
    }

}

Page.tml

<t:vendor vendorName="vendorName"/>

Anybody know if it's possible to connect the fields like this. Thanks

Reply via email to