Form::add_error( string $code, string $msg = '' )

Description #

Add an error to form object.

Parameters #

  • $code
    string (Required) Error code.
  • $msg
    string (Optional) Error message. Default value: ''

Source #

File: lib/class-form.php

	public function add_error( $code, $msg = '' ) {
		$this->errors[ $code ] = $msg;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment