Fatal Error: Object of class DataTables\Editor\ValidateOptions could not be converted to string in

Fatal Error: Object of class DataTables\Editor\ValidateOptions could not be converted to string in

Mr Arslan JawedMr Arslan Jawed Posts: 3Questions: 2Answers: 0

Hello,

I am receiving following error

"Object of class DataTables\Editor\ValidateOptions could not be converted to string in".

->validator( Validate::maxNum(7,
ValidateOptions::inst()
->message('Maximum size is 7'))

Replies

  • colincolin Posts: 5,619Questions: 0Answers: 981

    Try adding new before ValidateOptions - see examples here.

    Cheers,

    Colin

  • allanallan Posts: 50,060Questions: 1Answers: 7,409 Site admin

    Also maxNum has the following signature:

    maxNum( integer $max, string $decimalChar=".", ValidateOptions $cfg=null)
    

    You are missing the decimal character.

    Allan

Sign In or Register to comment.