Skip to content

Validation errors not showing in object using afQuickField #3

@Philip-Nunoo

Description

@Philip-Nunoo

Using

import SimpleSchema from 'simpl-schema';

export const WeatherSchema = new SimpleSchema({
    temperature: {
        type: Object,
        label: 'Temperature',
        required: true,
    },
    'temperature.min': {
        type: String,
        label: 'Low: ',
    },
    'temperature.max': {
        type: String,
        label: 'High: ',
    },
});

In autoform template

<Template name="someTemplate">
{{#autoForm
                    schema=weatherSchema
                    id="dailyLogSchemaForm"
                    type="method"
                    meteormethod="addTemperature"
                    template="bootstrap4"
}}
{{> afQuickField name="weather"}}
{{/autoForm}}
</Template>

The weatherSchema comes from a helper

the output after submission

image

Validation messages and indicators not shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions