Skip to content

Commit bd376c5

Browse files
Use id() shortcut
1 parent 9af13c9 commit bd376c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

model/src/main/kotlin/io/spine/validation/PatternPolicy.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ internal class PatternPolicy : Policy<FieldOptionDiscovered>() {
6868
val option = event.option.unpack<PatternOption>()
6969
val message = option.errorMsg.ifEmpty { option.descriptorForType.defaultMessage }
7070
return patternFieldDiscovered {
71-
id = fieldId {
72-
type = field.declaringType
73-
name = field.name
74-
}
71+
id = field.id()
7572
errorMessage = message
7673
pattern = option.regex
7774
modifier = option.modifier

0 commit comments

Comments
 (0)