java - JDBC API to trim String length to match with database column specification -


my input string longer database column specification is. have api in jdbctemplate automatically trim string match database column limit.
not yet sure, limit in column may change in future , may vary according environment. limiting string in code not feasible solution, want store as possible.

no.
should part of input validation.
please note in case should never trust client side, client-side input validation (i.e. putting maxlength on input field) required it's not enough.
should perform server side input validation, , in case should not allow input exceed database column limit.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -