Error 422 Unprocessable Content

POST https://helpinghand.nz/admin/products/new/simple

Validator calls

Path Message Invalid value Violation
data.code Product code can only be comprised of letters, numbers, dashes and underscores.
"Bulogi Hot Pot Noodles"
Symfony\Component\Validator\ConstraintViolation {#11097
  -message: "Product code can only be comprised of letters, numbers, dashes and underscores."
  -messageTemplate: "sylius.product.code.regex"
  -parameters: [
    "{{ value }}" => ""Bulogi Hot Pot Noodles""
    "{{ pattern }}" => "/^[\w-]*$/"
  ]
  -root: Symfony\Component\Form\Form {#8516
    name: "sylius_admin_product"
    type_class: "Sylius\Bundle\AdminBundle\Form\Type\ProductType"
    data: App\Entity\Product\Product {#5909
      #id: null
      #code: "Bulogi Hot Pot Noodles"
      #attributes: Doctrine\Common\Collections\ArrayCollection {#5912 …}
      #variants: Doctrine\Common\Collections\ArrayCollection {#5914 …}
      #options: Doctrine\Common\Collections\ArrayCollection {#5915 …}
      #associations: Doctrine\Common\Collections\ArrayCollection {#5913 …}
      #createdAt: DateTime @1745806860 {#5911
        date: 2025-04-28 02:21:00.194053 UTC (+00:00)
      }
      #updatedAt: null
      #enabled: true
      #translations: Doctrine\Common\Collections\ArrayCollection {#5910 …}
      #translationsCache: []
      #currentLocale: "en_NZ"
      #currentTranslation: null
      #fallbackLocale: "en_NZ"
      #variantSelectionMethod: "choice"
      #productTaxons: Doctrine\Common\Collections\ArrayCollection {#5916 …}
      #channels: Doctrine\Common\Collections\ArrayCollection {#5917 …}
      #mainTaxon: App\Entity\Taxonomy\Taxon {#9981 …}
      #reviews: Doctrine\Common\Collections\ArrayCollection {#5918 …}
      #averageRating: 0.0
      #images: Doctrine\Common\Collections\ArrayCollection {#5919 …}
    }
  }
  -propertyPath: "data.code"
  -invalidValue: "Bulogi Hot Pot Noodles"
  -plural: null
  -code: "de1e3db3-5ed4-4941-aae4-59f3667cc3a3"
  -constraint: Symfony\Component\Validator\Constraints\Regex {#10958 …}
  -cause: null
}
children[variant].data.code Product variant code can only be comprised of letters, numbers, dashes and underscores.
"Bulogi Hot Pot Noodles"
Symfony\Component\Validator\ConstraintViolation {#11536
  -message: "Product variant code can only be comprised of letters, numbers, dashes and underscores."
  -messageTemplate: "sylius.product_variant.code.regex"
  -parameters: [
    "{{ value }}" => ""Bulogi Hot Pot Noodles""
    "{{ pattern }}" => "/^[\w-]*$/"
  ]
  -root: Symfony\Component\Form\Form {#8516
    name: "sylius_admin_product"
    type_class: "Sylius\Bundle\AdminBundle\Form\Type\ProductType"
    data: App\Entity\Product\Product {#5909
      #id: null
      #code: "Bulogi Hot Pot Noodles"
      #attributes: Doctrine\Common\Collections\ArrayCollection {#5912 …}
      #variants: Doctrine\Common\Collections\ArrayCollection {#5914 …}
      #options: Doctrine\Common\Collections\ArrayCollection {#5915 …}
      #associations: Doctrine\Common\Collections\ArrayCollection {#5913 …}
      #createdAt: DateTime @1745806860 {#5911
        date: 2025-04-28 02:21:00.194053 UTC (+00:00)
      }
      #updatedAt: null
      #enabled: true
      #translations: Doctrine\Common\Collections\ArrayCollection {#5910 …}
      #translationsCache: []
      #currentLocale: "en_NZ"
      #currentTranslation: null
      #fallbackLocale: "en_NZ"
      #variantSelectionMethod: "choice"
      #productTaxons: Doctrine\Common\Collections\ArrayCollection {#5916 …}
      #channels: Doctrine\Common\Collections\ArrayCollection {#5917 …}
      #mainTaxon: App\Entity\Taxonomy\Taxon {#9981 …}
      #reviews: Doctrine\Common\Collections\ArrayCollection {#5918 …}
      #averageRating: 0.0
      #images: Doctrine\Common\Collections\ArrayCollection {#5919 …}
    }
  }
  -propertyPath: "children[variant].data.code"
  -invalidValue: "Bulogi Hot Pot Noodles"
  -plural: null
  -code: "de1e3db3-5ed4-4941-aae4-59f3667cc3a3"
  -constraint: Symfony\Component\Validator\Constraints\Regex {#11482 …}
  -cause: null
}