Skip to main content
backdrop Backdrop Forum
  • Welcome!
    • Login
    • Register
  • Forum
  • FAQ
  • Following
  • About
  • Wishlist
  1. Home »
  2. [DX] [D8] Add a `validate()` method to entity classes

[DX] [D8] Add a `validate()` method to entity classes

In Drupal 8, classes that are used in order to implement a content entity (which extend the ContentEntityBase class) have a validate() method that validates the values entered when creating the entity.

A similar method should be introduced in Backdrop and added to EntityInterface.

GitHub Link: 
https://github.com/backdrop/backdrop-issues/issues/6061
GitHub Issue #: 
6061

Weekly office hours

Bring your questions to our weekly virtual office hours, every Wednesday. Everyone is welcome.

Recent topics

Animating the header links

Posted 1 day 7 hours ago by (NexViolentus) in How-To and Troubleshooting

Github Tips and Tricks for Contrib Maintainers

Posted 2 days 8 hours ago by (stpaultim) in How-To and Troubleshooting

Ubercart - Programmatically add product to cart and straight to Checkout

Posted 1 week 3 days ago by Martin Price | System Horizons Ltd (yorkshirepudding) in How-To and Troubleshooting

Recent comments

Thanks Alejandro. That was the clues I needed.

Posted 1 week 2 days ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:

Ubercart - Programmatically add product to cart and straight to Checkout

Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...

Posted 1 week 3 days ago by Alejandro Cremaschi (argiepiano) on:

Ubercart - Programmatically add product to cart and straight to Checkout

No problem, let's see how it evolves.  I'd be happy to provide a suggested version if i could.  I will keep that in mind and try learn this hook chain hopefully very soon. I will...

Posted 1 week 4 days ago by RS Snyder (theflightrs) on:

File hashing uploads made through TinyMCE

Powered by Backdrop CMS

Stay connected

Sign up for our newsletter

Footer Menu

  • documentation
  • localization
  • events
  • forum
  • backdropcms.org