LLMS_Form_Validator::sanitize_field_number( string $posted_value )

Sanitize a number field


Parameters Parameters

$posted_value

(string) (Required) User-submitted (dirty) value.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/forms/class-llms-form-validator.php

	protected function sanitize_field_number( $posted_value ) {
		return preg_replace( '/[^0-9.,]/', '', $posted_value );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.