Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Checkboxes field type keeps triggering Validation error message

Started by Muut Archive 10 years ago · 1 replies · 681 views
10 years ago

Running into an issue where the checkboxes form field functionality keeps triggering this error message whenever I try saving a page:

TXT
Validation failed: 
Invalid input in "Platforms"

I included my blueprint below:

YAML

title: Review

'@extends':
    type: default
    context: blueprints://pages

form:
    fields:
        tabs:
            fields:
                review:
                    type: tab
                    title: Review 

                    fields:
                        review_basics:
                            type: section
                            title: Basics
                            underline: true

                        header.review_basics_masthead:
                            label: Masthead
                            type: pagemediaselect

                        header.review_basics_author:
                            type: select
                            classes: fancy
                            size: long
                            label: Author
                            options:
                                'Author 1': Author 1
                                'Author 2': Author 2
                                'Author 3': Author 3

                        review_gameinformation:
                            type: section
                            title: Game Information
                            underline: true

                        header.review_gameinformation_platforms:
                            type: checkboxes
                            label: Platforms
                            options:
                                ps4: PS4
                                ps3: PS3
                                xbo: Xbox One
                                x360: Xbox 360
                                wiiu: Wii U
                                wii: Wii
                                n3ds: 3DS
                                nds: DS
                                vita: Vita
                                psp: PSP
                                pc: PC

                        header.review_gameinformation_developer:
                            type: text
                            label: Developer

                        header.review_gameinformation_publisher_america:
                            type: text
                            label: Publisher (North America)

                        header.review_gameinformation_publisher_europe:
                            type: text
                            label: Publisher (Europe)

                        header.review_gameinformation_release_america:
                            type: datetime
                            label: Release Date (America)

                        header.review_gameinformation_release_europe:
                            type: datetime
                            label: Release Date (Europe)
---
10 years ago

Not sure of the exact reason why this worked (would like to know if there's a better way), but I did get it to save by setting use: keys in the blueprint config.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1123 9 years ago