Builds a rule from raw (browser or Compose form) input, trimming and collapsing empty optional fields before validation so callers do not have to.