Behavior of `module.output` in the `terraform validate` command

I want the terraform validate command to flag the following case as a invalid. However, when I run terraform validate, it returns a “valid” result.
Is there any mention of this behavior in the Terraform documentation? I couldn’t find anything when I searched, so if it exists, please let me know.

In my case, I’m using the Output of a nested module, so I was having trouble determining whether this was the cause or if it was due to the way validate handles objects.

terraform version: 1.16.4

# module: database 
output "tables" {
 value = {
  table1 = module.databaseA.table1 # string
  table2 = module.databaseA.table2 # string
 }
}

------

module "my_module" {
 use_table = module.database.tables.table3 # invalid
}

Hey there @oshiro :waving_hand: ,

I think what you’re looking for is the type argument of the output block which was recently introduced in v1.15: Output block reference for the Terraform configuration language | Terraform | HashiCorp Developer

So using your example above, this should produce an error during terraform validate:

output "tables" {
  type = object({ table1 = string, table2 = string })
  value = {
    table1 = module.databaseA.table1
    table2 = module.databaseA.table1
  }
}

Thank you for your speedy advice :grinning_face_with_smiling_eyes:
Trying the solution solved my problem!