Question: I created a method for custom validation and I can not return true value from this method. 
This is my method:

```
requiredFileType(categoryList: CategoryModel[]) {
    return function (control: FormControl) {
      const file = control.value;
      if (file) {
        const extension = file;

        for (let i = 0; i < categoryList.length; i++) {

          for (let j = 0; j < categoryList[i].productModel.length; j++) {
            for (let k = 0; k < categoryList[i].productModel[j].imageProduct.length; k++) {
              console.log(categoryList[i].productModel[j].imageProduct[k].image_path);
              if (categoryList[i].productModel[j].imageProduct[k].image_path.includes(extension)) {
                console.log(categoryList[i].productModel[j].imageProduct[k].image_path);
                return {

                  requiredFileType: null
                };
              }
            }

          }

        }
        return {
          requiredFileType: true
        };
      }

      return {
        requiredFileType: true
      };
    };
  }

```

I do not the understend, I do not have an error, my loop work good but when need return true method return null;

This is my FormControl:

```
 'image': new FormControl(image, this.requiredFileType(this.categoryList)),

```

Answer: 
You're close. Name your variables, arguments, and parameters something meaningful.

> 
> if it is greater than 130 or less than 0 set $age value as unset (just
>  as a string)
> 
> 
> 

Probably means `$this->age = 'unset';`

```
<?php 
class User
{
    private $name;
    private $age;
    public $site;

    function __construct($name, $site, $age)
    {
        echo "User was successfully created!";

        $this->name = $name;
        $this->site = $site;

        if ($age > 130 || $age < 0) {
            $this->age = 'unset';
        } else {
            $this->age = $age;
        }

    }

    public function getFullInfo()
    {
        return "$this->name at the age of $this->age is a user of $this->site";
    }
}

$user = new User('Tony McTony', 'Tree House', 35);

echo $user->getFullInfo();

// Output: User was successfully created!Tony McTony at the age of 35 is a user of Tree House

```
Most likely your problem is the unsetting of the `$w` variable. When they say unset the variable, you should do so to the `$this->age` rather than the `$w`.

```
<?php
$this->age = $w;
if($w > 130 || $w < 0){
   $this->age = 'unset';
};
?>

```

If this doesn't solve your problem then a more descriptive explanation of the problem would be helpful.