Formula Expression is required on the action attributes error

Formula Expression is required on the action attributes error occurs when pagereference('/apex/pageName') doesn't have backslash in front of apex.

Correct: pagereference('/apex/sample1');

Incorrect: pagereference('apex/sample1');

in incorrect, backslash ('/') is missing in front of apex.

Cheers!!!