Update script documentation
This commit is contained in:
parent
3ee429c63b
commit
307a4c7533
2 changed files with 7 additions and 5 deletions
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
## Validates some data against a set of rules.
|
## Validates some [param data] against a set of predefined rules.
|
||||||
extends Node
|
extends Node
|
||||||
class_name CoreValidationSingle
|
class_name CoreValidationSingle
|
||||||
|
|
||||||
|
|
|
@ -59,10 +59,12 @@ func _schedule() -> void:
|
||||||
schema.queue_free()
|
schema.queue_free()
|
||||||
|
|
||||||
# +++ data validation +++
|
# +++ data validation +++
|
||||||
func get_schema(schema: Dictionary, parent: Node) -> CoreValidationSchema:
|
## Returns a new [CoreValidationSingle]
|
||||||
schemas.append(parent)
|
|
||||||
return CoreValidationSchema.new(core, schema, parent)
|
|
||||||
|
|
||||||
func get_single(data, parent: Node) -> CoreValidationSingle:
|
func get_single(data, parent: Node) -> CoreValidationSingle:
|
||||||
singles.append(parent)
|
singles.append(parent)
|
||||||
return CoreValidationSingle.new(core, data, parent)
|
return CoreValidationSingle.new(core, data, parent)
|
||||||
|
|
||||||
|
## Returns a new [CoreValidationSchema]
|
||||||
|
func get_schema(schema: Dictionary, parent: Node) -> CoreValidationSchema:
|
||||||
|
schemas.append(parent)
|
||||||
|
return CoreValidationSchema.new(core, schema, parent)
|
||||||
|
|
Loading…
Reference in a new issue