Align validator identity and span domain checks
This commit is contained in:
@@ -2,7 +2,6 @@ package proposals
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// CorrectionProposal is the base proposal emitted by correction modules.
|
||||
@@ -35,7 +34,7 @@ func (p CorrectionProposal) Validate() error {
|
||||
if p.TargetSegmentID <= 0 {
|
||||
return fmt.Errorf("proposal id must be positive")
|
||||
}
|
||||
if strings.TrimSpace(p.OriginalText) == "" {
|
||||
if p.OriginalText == "" {
|
||||
return fmt.Errorf("proposal original_text must not be empty")
|
||||
}
|
||||
if p.Confidence < 0.0 || p.Confidence > 1.0 {
|
||||
|
||||
Reference in New Issue
Block a user