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: 9Questions: 6Answers: 1

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: 6,884Questions: 0Answers: 1,176

    Try adding new before ValidateOptions - see examples here.

    Cheers,

    Colin

  • allanallan Posts: 50,876Questions: 1Answers: 7,626 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.