Limit quantity according to serial number

Can anyone help me in limiting serial number entry based on quantity of item in Purchase Receipt.
Thanks in advance.

Can you elaborate what exactly are you wanting to achieve, because as I understand that in ERPnext if the item is setup to have a serial number, one can only enter only the same number of serial numbers as mentioned in the quantity.

Thanks for replying @root13F,

I want to fix arguments in serial number according to quantity.
Eg: If I put 2 in quantity and then enter multiple serial numbers. It will take two arguments.
If quantity = 4, arguments will be less than or equal to 4.

Hope you understood.