Fix contains() function

This commit is contained in:
JeremyStar™ 2024-05-11 12:02:12 +02:00
parent 6926fab873
commit cdb2dfee19
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -283,7 +283,7 @@ func has_values(values: Array) -> CoreValidationSingle:
## Ensures that [param data] contains at least <[code]minimum_matches[/code]> (or all if set to [code]-1[/code]) values.[br] ## Ensures that [param data] contains at least <[code]minimum_matches[/code]> (or all if set to [code]-1[/code]) values.[br]
## Applies to [String] & [StringName]. ## Applies to [String] & [StringName].
func contains(values: Array, minimum_matches: int = 1) -> CoreValidationSingle: func contains(values: Array, minimum_matches: int = 1) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_VALUES, "values": values, "minimum_matches": minimum_matches }) rules.append({ "type": CoreTypes.ValidationType.CONTAINS, "values": values, "minimum_matches": minimum_matches })
return self return self
## Matches a regular expression against [param data].[br] ## Matches a regular expression against [param data].[br]