engine: Don't force validation for hidden resources
I think this is what I want in most scenarios, is there a reason to do otherwise? This is because we may wish to export incomplete resources, where the remaining necessary fields for validation happens on collect.
This commit is contained in:
@@ -312,6 +312,12 @@ func Validate(res Res) error {
|
||||
return fmt.Errorf("the Res name starts with a $")
|
||||
}
|
||||
|
||||
// Don't need to validate normally if hidden.
|
||||
// XXX: Check if it's also Exported too? len(res.MetaParams.Export) > 0
|
||||
if res.MetaParams().Hidden {
|
||||
return nil
|
||||
}
|
||||
|
||||
return res.Validate()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user