Validate constraints in require command, fixes #2197